[PATCH] D71974: [Attributor][WIP] Connect AAIsDead with AAUndefinedBehavior
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 29 12:05:02 PST 2019
jdoerfert added a comment.
I think we need to query AAUB from AAIsDead in the updateImpl. See the TODO in `AAIsDeadFunction::updateImpl(Attributor &A)`. Similarly, in AAUB we should go through the explorer context when we add something to the knownUB set. So if `I` is knownUB, make all instructions in the must-be-executed-context of `I` knownUB, thus insert all into the set. In AAIsDead we can then simply query `isKnownUB` and that will only need to look into the set (as before). In addition to the TODO mentioned before we need the same logic in the initialize from AAIsDeadFunction before we add the entry block as live.
================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:1982
+ Explorer = &(A.getInfoCache().getMustBeExecutedContextExplorer());
+ }
+
----------------
We should avoid caching stuff in the AAs. `isKnownToCauseUB` can take an Attributor reference.
================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:2719
}
+ MyA = &A;
}
----------------
As mentioned above, you can add the Attributor as a argument to calls.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71974/new/
https://reviews.llvm.org/D71974
More information about the llvm-commits
mailing list