Skip to content
Snippets Groups Projects

Loop bound lte

Merged Xavier Routh requested to merge loop-bound-lte into main
Files
2
@@ -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).
Loading