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

Hideto Ueno via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 22 07:44:24 PDT 2019


uenoku marked an inline comment as done.
uenoku added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:1218
+      Pred, &getAnchorScope().getEntryBlock().front(),
+      getWorst<BooleanState>());
 
----------------
jdoerfert wrote:
> I thought about this some more:
> 1) Should we do this traversal for nonnull explicitly or just do it for deref and then have nonnull ask the deref attribute if nonnul is implied. (for now most use cases will not have null as a valid pointer)
> 2) We should not traverse the context of the same instruction multiple times, or at least not in every update. What we could do is run this in the initialize and remember the AA's that would imply the current one (line 1202). In the update we then only check if any of the implied ones is *known* if not we try to determine it the usual way.
> 
> 
> (` &getAnchorScope().getEntryBlock().front(),` will become `getCtxI()`)
In the current patch, context is traversed only in `initialize` and collect *interesting* AA. In `updateImpl`,  these AAs will be merged into the state. 


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

https://reviews.llvm.org/D65402





More information about the llvm-commits mailing list