[LLVMdev] GSoC - Range Analysis
John Regehr
regehr at cs.utah.edu
Mon Apr 2 21:41:42 PDT 2012
> No, not yet. We have not used the analysis to implement any
> optimization yet. So far we can only flag that variables are
> dead-code, but I have not tried to remove this code. And for the C
> programs that we have analyzed, the number of variables that are
> dead-code, after LLVM optimizes the program, is small.
Even if only a few variables become dead, it might still be the case that
many dynamic branches can be eliminated. I'd encourage you to try this,
particularly on the Ada codes that Duncan mentioned and the output of the
integer overflow checking tool that I mentioned.
One transformation that we found to be quite useful when implementing a
range analysis for C was a debugging mode that inserted range assertions
into the generated code. This was an easy way to spot implementation
errors that otherwise would have been quite hard to detect.
Do you know how your results compare to GCC's existing value range
propagation pass?
Anyway I think this sounds like an interesting project and potentially a
useful one.
John
More information about the llvm-dev
mailing list