[llvm] [DependenceAnalysis] Extending SIV to handle separate loops (PR #128782)
Michael Kruse via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 30 04:46:00 PDT 2025
================
@@ -825,16 +874,23 @@ void DependenceInfo::establishNestingLevels(const Instruction *Src,
DstLoop = DstLoop->getParentLoop();
DstLevel--;
}
+ // find the first separate similar level
----------------
Meinersbur wrote:
This goes from innermost loops to outer ones, and stop at the innermost unequal one. But what if the second innermost is equal just the outermost is not:
```cpp
for (int i = 0; i < 42; ++i) { // fusable
for (int j = 0; j < 21; ++j) { // not fusable
}
}
for (int i = 0; i < 42; ++i) { // fusable
for (int j = 0; j < 42; ++j) {
}
}
```
I think the i-loop should be comon levels, just the j-loops not.
https://github.com/llvm/llvm-project/pull/128782
More information about the llvm-commits
mailing list