[PATCH] D84589: [CodeMoverUtils] Add optional data dependence checks using Alias Analysis

Bardia Mahjour via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 13 09:04:36 PDT 2020


bmahjour added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/CodeMoverUtils.cpp:287
+      // RAR dependency is safe
+      if (isRefSet(Result) && isRefSet(DestResult))
+        return false;
----------------
Two comments here:
1. As I mentioned before, `isRefSet` may be true when `isModSet` is also true, so if you want to check for RAR you'd have to make sure that `isModSet` is false.
2. Why do we need two results (`Result` and `DestResult`)? I'm not sure we need to query `AA.getModRefInfo` twice, once for each direction. Alias queries normally refer to a value in a symmetric bit matrix. Do you have a test where the result of `AA.getModRefInfo` is different depending on the order in which you pass the two memory location arguments? 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84589



More information about the llvm-commits mailing list