[PATCH] D106397: [Attributor] Use CFG reasoning to filter potentially interfering writes

Kuter Dinel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 25 23:54:26 PDT 2021


kuter added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/AttributorAttributes.cpp:1184
+        if (DomAcc != &Acc &&
+            DT->dominates(Acc.getLocalInst(), DomAcc->getLocalInst())) {
+          return true;
----------------
kuter wrote:
> I don't understand why we can ignore a store here.
> 
> Even if `Acc` dominates a store here doesn't mean that there can't be path from `Acc` that 
> doesn't go through `DomAcc` right ? it only means that the  execution must pass through 
> `Acc` before reaching `DomAcc` or am I confused ? 
> 
> Wouldn't it make more sense to use the post-dominator tree here ? 
Oh I  get it now. There is no path from `Acc` to load that doesn't go through the `DomAcc` because `DomAcc` dominates the load. 

Very interesting. Some comments could be added here : - )


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106397



More information about the llvm-commits mailing list