[LLVMdev] value tracking
David Greene
dag at cray.com
Tue Jan 20 14:25:24 PST 2009
On Tuesday 20 January 2009 12:09, John Criswell wrote:
> > My proposal:
> > - create a value tracking analysis interface that can provide extensive
> > info about vars (e.g. the set of possible values for a given vars, etc..)
> > - implement that interface in several ways with different tradeoffs of
> > preciseness vs speed (e.g. range analysis, value set tracking, path
> > sensitive or not, interprocedural, etc..)
>
> I think the analysis group idea is a good idea. A standardized
> interface for querying this sort of information makes code reuse between
> LLVM developers doing different projects easier.
>
> As an example of another transform which requires such information, in
> the memory safety work that we do, we have transforms that could benefit
> from knowing the range of values that an integer value can take
> (specifically, we're usually interested in the min and max values a GEP
> index can have). Having a standardized interface would allow us to
> re-use analysis passes developed by other LLVM contributors for other
> applications, and if we develop a pass that computes such information
> more aggressively, it makes it easier for us to write that code in a way
> that is usable by the LLVM community at large.
I agree with this approach. Just yesterday I ran into a situation where I
really wanted value range information. I really like the AliasAnalysis design
where cheaper analyses try to give an answer before querying more expensive
analyses. This would fit in well with Nuno's plan to provide analyses with
different time/completeness tradeoffs.
-Dave
More information about the llvm-dev
mailing list