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

Jia Chen via llvm-dev llvm-dev at lists.llvm.org
Mon Mar 21 12:26:30 PDT 2016


>  You can solve andersens and steengaards and everything else using 
> standard dataflow solvers, and that's an implementation strategy, but 
> it will be really slow.
>
> Part of the tradeoff is how fast something runs, and approaches that 
> are orders of magnitude faster often change the calculus of what 
> people do. For example, before hardekopf's work, andersens was 
> considered too slow to be practical in a real compiler.
>
> Now, GCC does it by default.
>
> So i would call that approach a superior approach :)
>
> So saying that CFL-AA offers nothing superior in terms of approach, 
> IMHO, misunderstands the nature of the problem. If your goal is to get 
> precision at all costs, then yes, it's not superior.  If your goal is 
> to get something into a production compiler, that is understandable, 
> maintainable, can turn on and off field and context sensitivity 
> easily, etc, then it may be a superior approach.
>
>
Apparently "superior approach" is a misnomer on my side. My apologies. 
What I should have said is "an approach with superior precision". Both 
cfl and Ben Hardekopf's work you mentioned (which improves analysis 
performance by using SSA transformation as a pre-pass to eliminate 
easy-to-analyze pointers) can be viewed as optimizations on standard 
dataflow solver, but at the end of the day they do nothing more than 
that. From a client's perspective, they are no different from standard 
solvers except they are faster.

I do acknowledge that cfl may work better in practice (although I held 
different opinions about understandability and maintainability). It's 
just that I tend to make judgment of pointer analysis based on the need 
of a client. Again, I meant no offense and I apologize for my 
inappropriate choice of words.

-- 
Best Regards,

--
Jia Chen


More information about the llvm-dev mailing list