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

Haicheng Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 10 17:43:19 PDT 2017


haicheng added a comment.

> It occurs to me that the need for this might be removed by another potential improvement (suggested to me by Chandler at EuroLLVM this year): We can make CGSCC analysis wrapper for our current analysis passes in order to allow these analyses to look back through function arguments into the function's callers. To make this work, we'd:
> 
> 1. Make CGSCC analysis passes corresponding to our current analysis passes. For example, AA, ValueTracking, etc. (I realize that ValueTracking is not really an analysis pass right now, and while we might want to change that at some point, I don't think it matters for this description).
> 2. These pass accept analysis queries and produce results by looking at the calling functions and calling the function/local analysis on the values at each call site, and then intersecting the results. If there are too many call sites, or unknown call sites, then you need to give up.
> 3. Provide these CGSCC analysis handles to the corresponding local analyses so that, as they do a recursive analysis, when they hit arguments, then can call into the CGSCC analyses to continue the analysis into the callers.
> 
>   If we did  that, do you think we'd still need this transformation?

What you described was close to what I was looking for before I found this patch.  I don't know how difficult to implement it, but I can try to hook CGSCC with BasicAA first.

Thank you.

Haicheng


https://reviews.llvm.org/D4609





More information about the llvm-commits mailing list