Skip to content
Snippets Groups Projects

Loop bound lte

Merged Xavier Routh requested to merge loop-bound-lte into main
1 file
+ 0
10
Compare changes
  • Side-by-side
  • Inline
@@ -95,8 +95,6 @@ pub fn forkify_loop(
) -> bool {
let function = editor.func();
println!("forkifying {:?}", l.header);
let Some(loop_condition) = get_loop_exit_conditions(function, l, control_subgraph) else {
return false;
};
@@ -114,7 +112,6 @@ pub fn forkify_loop(
let ivs = compute_induction_vars(editor.func(), l, &loop_variance);
let ivs = compute_iv_ranges(editor, l, ivs, &loop_condition);
let Some(canonical_iv) = has_canonical_iv(editor, l, &ivs) else {
println!("no canonical iv");
return false;
};
@@ -133,7 +130,6 @@ pub fn forkify_loop(
};
let Some(bound_dc_id) = bound else {
println!("no bound iv");
return false;
};
@@ -171,8 +167,6 @@ pub fn forkify_loop(
return false;
}
println!("this one");
// Get all phis used outside of the loop, they need to be reductionable.
// For now just assume all phis will be phis used outside of the loop, except for the canonical iv.
// FIXME: We need a different definiton of `loop_nodes` to check for phis used outside hte loop than the one
@@ -202,9 +196,6 @@ pub fn forkify_loop(
let loop_body_last = editor.get_uses(loop_if).next().unwrap();
println!("phis {:?}", reductionable_phis);
if reductionable_phis
.iter()
.any(|phi| !matches!(phi, LoopPHI::Reductionable { .. }))
@@ -412,7 +403,6 @@ pub fn forkify_loop(
Ok(edit)
});
println!("result: {:?}", result);
return result;
}
Loading