[llvm] [LoopInterchange] Consider forward/backward dependency in vectorize heuristic (PR #133672)
Michael Kruse via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 24 05:26:57 PDT 2025
================
@@ -126,11 +133,32 @@ static bool noDuplicateRulesAndIgnore(ArrayRef<RuleTy> Rules) {
static void printDepMatrix(CharMatrix &DepMatrix) {
for (auto &Row : DepMatrix) {
- for (auto D : Row)
+ ArrayRef<char> RowRef(Row);
+
+ // Drop the last element because it is a flag indicating whether this is
+ // forward dependency or not, which doesn't affect the legality check.
+ for (auto D : RowRef.drop_back())
LLVM_DEBUG(dbgs() << D << " ");
LLVM_DEBUG(dbgs() << "\n");
}
}
+
+static bool inThisOrder(const Instruction *Src, const Instruction *Dst) {
----------------
Meinersbur wrote:
Add doxygen comment?
https://github.com/llvm/llvm-project/pull/133672
More information about the llvm-commits
mailing list