[PATCH] D71974: [Attributor][WIP] Connect AAIsDead with AAUndefinedBehavior

Stefanos Baziotis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 30 06:11:16 PST 2019


baziotis marked an inline comment as done.
baziotis added a comment.

In D71974#1798289 <https://reviews.llvm.org/D71974#1798289>, @jdoerfert wrote:

> I think we need to query AAUB from AAIsDead in the updateImpl. See the TODO in `AAIsDeadFunction::updateImpl(Attributor &A)`.


I didn't see that at all, thanks! I'll give it a try.

> 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).

If I understand it correctly, this will mark as UB all the instructions from the UB instruction //and forwards// (i.e. the must be executed context goes to the successors). That will probably complicate things as to see if a BB is dead, with the current code, it makes sense
to see its first instruction right?

> 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.

Oh yes, I had added and removed that basically because that I think can't work with assumed info easily. I'll add it with known info to make clear what I mean.



================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:2719
     }
+    MyA = &A;
   }
----------------
jdoerfert wrote:
> As mentioned above, you can add the Attributor as a argument to calls.
Ok, thanks, I'll do it that way.


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