[llvm-dev] Existing studies on the benefits of pointer analysis

Jia Chen via llvm-dev llvm-dev at lists.llvm.org
Sat Mar 26 12:29:01 PDT 2016


On 03/26/2016 10:02 AM, Daniel Berlin wrote:
> With no offense meant, I've been writing solvers for 10+ years.  What 
> you are suggesting is not just a tweak.  Doing it on a per pointer 
> basis is neither trivial nor easy to keep sound. If you think it is, I 
> would suggest taking GCC's implementation and trying to do it. If what 
> you say was true, production compilers would be doing it.  But they don't.

None taken. I didn't say it is an easy problem. Pointer analysis on a 
C-ish language is always hard no matter what approach one takes, let 
alone tuning the precision on a per pointer basis.
>
> The other problem you mention is, IMHO, not actually as interesting.  
> We already have traditional methods (value profiling, etc) of knowing 
> which things matter.  Static prediction of this has a long history of 
> over promise and under delivery.

I agree that it is easier to get some quick hints with profiling, yet 
like any other dynamic approaches profiling has its own drawbacks: 
benchmark dependent, no soundness guarantees, etc. I believe it is still 
not the time to conclude that we've already got a perfect solution on 
this problem and declare death sentence to any attempts to seek a good 
static prediction mechanism.

- Jia


More information about the llvm-dev mailing list