Since D104432 we can look through memory by analyzing all writes that
might interfere with a load. This patch provides some logic to exclude
writes that cannot interfere with a location, due to CFG reasoning.
We make sure to avoid multi-thread write-read situations properly while
we ignore writes that cannot reach a load or writes that will be
overwritten before the load is reached.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Transforms/IPO/AttributorAttributes.cpp | ||
---|---|---|
1158 | 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 Wouldn't it make more sense to use the post-dominator tree here ? |
llvm/lib/Transforms/IPO/AttributorAttributes.cpp | ||
---|---|---|
1158 | 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 : - ) |
llvm/lib/Transforms/IPO/AttributorAttributes.cpp | ||
---|---|---|
1158 | 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. |
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 ?