[PATCH] D71799: [Attributor] AAUndefinedBehavior: Check for branches on undef value.

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 23 23:49:26 PST 2019


jdoerfert added a comment.

Disclaimer: I read only part of the conversation.

In D71799#1794768 <https://reviews.llvm.org/D71799#1794768>, @uenoku wrote:

> In D71799#1794762 <https://reviews.llvm.org/D71799#1794762>, @baziotis wrote:
>
> > I see the message. Sorry btw that I don't know exactly how `AAValueSimplify` works. When I started this patch, I assumed it was in everyone's best interest
> >  to not spend time in it right now, so I'm guessing from looking small pieces of its code.
>
>
> Sorry for my lack of words. I thought you were talking about in `updateImpl`. I think it can't happen **in updates** but can happen once reaches to a fix point.


FWIW, I think @uenoku comment is correct here but it might help to elaborate:

The way `AAValueSimplify` is build ensures that only once a fixpoint is reached the simplified value is "known". One could also say, once a simplified value is known we know a fixpoint had to be reached.
Now the interesting part here is that this means a fixpoint for the `AAValueSimplify` object. The Attributor will determine fixpoints for attributes eagerly, thus even if others are not there yet and still iterating. It will even inform them (via `indicateOptimisticFixpoint`) that they reached a fixpoint and can use the assumed value as known from now on. That is why you can see the "odd behavior" in a different objects `updateImpl`.


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

https://reviews.llvm.org/D71799





More information about the llvm-commits mailing list