[PATCH] D4609: Top-Down FunctionAttrs propagation for noalias, dereferenceable and nonnull inference

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 6 12:03:29 PDT 2017


hfinkel added a comment.

In https://reviews.llvm.org/D4609#801397, @haicheng wrote:

> Hi Hal,
>
> I am wondering what's your plan of this patch?  I am particularly interested in the propagation of noalias attributes.


I've not thought about this in a while, but I'd certainly like to see this functionality. Aside from some refactoring, it needs two things:

1. The noalias inference needs to be updated to be correct. The easiest way to do this is, instead of actually doing an alias check on the arguments, to call GetUnderlyingObjects and check for disjoint sets of *identified* underlying objects (still checking for capturing, and possibly restricting to local identified objects unless we can do a global capture check). Any set that is disjoint from the others means that its associated argument can be marked as noalias.
2. I'd like to revisit how the iteration is done and how this fits with the rest of the pass manager. While it does naturally iterate top down, and the CGSCC pass manager normally iterates the other way, there should be a way to put this logic into the part of the pipeline that is iterating with the inliner. I was never satisfied with the idea that we'd only do this once at the beginning of the pipeline. Now that we have a new pass manager, we can think about how this might work in that framework as well. Also, the new pass manager should make it more natural to get a per-function dominator tree, etc. @chandlerc, thoughts on how this might best be done?

> Thank you,
> 
> Haicheng




https://reviews.llvm.org/D4609





More information about the llvm-commits mailing list