[PATCH] D65402: [Attributor][MustExec] Deduce dereferenceable and nonnull attribute using MustBeExecutedContextExplorer

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 30 15:02:28 PDT 2019


jdoerfert added a comment.

In D65402#1606684 <https://reviews.llvm.org/D65402#1606684>, @uenoku wrote:

> In D65402#1605702 <https://reviews.llvm.org/D65402#1605702>, @jdoerfert wrote:
>
> > The idea is:
> >
> > - The InformationCache will make sure that the explore iterator is "incremented" if needed, e.g., intiially just run it until there is no more instruction to be found.
> > - The worklist will be populated by interesting instructions, most of the timer (transitive) users.
> > - The callback informs of the result and allows to re-populate the worklist. If it returns false, the exploration is aborted.
> > - The InformationCache will pop an instruction from the worklist, check if the explore iterator "contains" it, potentially increases the explored context, and return the result through the callback.
> >
> >   I think this will work well for most attributes we have now, what are your thoughts?
>
>
> I think this is reasonable.


Alternatively, we could do the following in the explorer (which I now find much nicer):

Given a predicate and an program point PP (=instruction), check if that predicate holds for sure if PP is executed. The nice part would be we move the logic there and we could handle "paths" later.
E.g.,  `pred(A)` and `pred(B)` are true, the method could say true for something like `PP; if (...) A; else B;`

If you want you could look into this, otherwise I will.


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

https://reviews.llvm.org/D65402





More information about the llvm-commits mailing list