[PATCH] D83311: [CodeMoverUtils] Add optional data dependence checks using MSSA

rithik sharma via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 18 07:09:21 PDT 2020


RithikSharma marked 6 inline comments as done.
RithikSharma added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/CodeMoverUtils.cpp:259
+        // write after read dependency on same memory location
+        if (InstMA == CurInstDefMA || InstLastDefMA == CurInstDefMA)
+          return true;
----------------
bmahjour wrote:
> I don't understand why we need this part: `|| InstLastDefMA == CurInstDefMA`. Wouldn't it suffice to check the reaching def of the use against the instruction being moved (the first part of this condition) ? Do you have a test that would fail if you remove it?
Yes we have a failure if we remove this, 
```
isSafeToMoveBefore(*StoreA2, *LoadA1, DT, &PDT, nullptr, &MSSA)
```



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83311





More information about the llvm-commits mailing list