[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 Aug 27 08:26:39 PDT 2019


jdoerfert added a comment.

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

> In D65402#1645907 <https://reviews.llvm.org/D65402#1645907>, @jdoerfert wrote:
>
> > I still think we should try to look only at (transitive) uses of the associated value instead of visiting all instructions and figuring out for each if it is interesting. You know what I mean?
>
>
> Tracking transitive uses is also good to me but  I'm not sure there is an API to (efficiently) determine whether use of the associated value belongs to the context. Isn't it same to iterator over the instructions in the context?


Given a use `U`, check if the user is an instruction `dyn_cast<Instruction>(U.getUser())` and ask the iterator if it is contained (`It.count(...)`). If the result is false we can try to explore further but let's start by exploring the context to the fullest and then doing the use & user stuff


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

https://reviews.llvm.org/D65402





More information about the llvm-commits mailing list