[PATCH] D137461: [LoopInterchange] Refactor and rewrite validDepInterchange()

Bardia Mahjour via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 15 14:15:28 PST 2022


bmahjour added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/LoopInterchange.cpp:190
+static bool isLexicographicallyPositive(std::vector<char> &DV) {
+  for (unsigned Level = 0; Level < DV.size(); ++Level) {
+    unsigned char Direction = DV[Level];
----------------
bmahjour wrote:
> Here we only check if direction is either `<` or `>`, but it could be `S`, which is a `non-"="` direction. I think we should return false if we encounter an `S` in this loop, or only iterate if it's not `=` or `I`.
correction: "...or only iterate if it *is* `=` or `I`"


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137461/new/

https://reviews.llvm.org/D137461



More information about the llvm-commits mailing list