Skip to content
Snippets Groups Projects
Commit 8609f3f8 authored by Xavier Routh's avatar Xavier Routh Committed by rarbore2
Browse files

Loop bound lte

parent 0717de36
No related branches found
No related tags found
1 merge request!207Loop bound lte
......@@ -106,7 +106,7 @@ pub fn forkify_loop(
else {
return false;
};
// Compute loop variance
let loop_variance = compute_loop_variance(editor, l);
let ivs = compute_induction_vars(editor.func(), l, &loop_variance);
......@@ -530,10 +530,11 @@ pub fn analyze_phis<'a>(
let intersection: HashSet<_> = set1.intersection(&set2).cloned().collect();
// If this phi uses any other phis the node is loop dependant,
// we use `phis` because this phi can actually contain the loop iv and its fine.
if uses_for_dependance.any(|node| phis.contains(&node) && node != *phi) {
LoopPHI::LoopDependant(*phi)
} else if intersection.clone().iter().next().is_some() {
// // we use `phis` because this phi can actually contain the loop iv and its fine.
// if uses_for_dependance.any(|node| phis.contains(&node) && node != *phi) {
// LoopPHI::LoopDependant(*phi)
// } else
if intersection.clone().iter().next().is_some() {
// PHIs on the frontier of the uses by the candidate phi, i.e in uses_for_dependance need
// to have headers that postdominate the loop continue latch. The value of the PHI used needs to be defined
// by the time the reduce is triggered (at the end of the loop's internal control).
......
......@@ -275,7 +275,7 @@ pub fn canonicalize_single_loop_bounds(
let new_binop_node = edit.add_node(Node::Binary { left, right: blah, op: BinaryOperator::LT });
edit = edit.replace_all_uses_where(binop_node, new_binop_node, |usee| *usee == if_node)?;
Some((init_id, bound_id, new_binop_node, if_node))
Some((init_id, blah, new_binop_node, if_node))
} else {guard_info};
edit = edit.replace_all_uses_where(dc_bound_node, new_dc_bound_node, |usee| *usee == new_bop)?;
......@@ -289,7 +289,6 @@ pub fn canonicalize_single_loop_bounds(
};
Ok(edit)
});
let update_expr_users: Vec<_> = editor
.get_users(*update_expression)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment