[PATCH] D106397: [Attributor] Use CFG reasoning to filter potentially interfering writes
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 26 07:50:58 PDT 2021
jdoerfert 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:
> 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 : - )
Yes, I will add some comment. You got it though,
```
Acc
| // dominance
DomAcc
| // dominance
load
```
means we have to go through DomAcc before we reach load after we executed Acc. So load won't see Acc.
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