Chris Lattner sabre at nondot.org
Tue May 9 20:10:59 PDT 2006

On Tue, 9 May 2006, Nick Lewycky wrote:
>>> For an analysis pass, I'm interested in reading the lattice values
>>> calculated by SCCP. Should I split the current SCCP optimization into an
>>> analysis piece and the optimization that depends on it, so that I can
>>> use its analysis results?
>> SCCP is already split into an SCCPSolver class that is used by the SCCP
>> and IPSCCP classes.  You should just be able to use SCCPSolver.  Note
>> that it is not a pass, just a class you can use.
> Thanks. I thought SCCPSolver was just a helper. I suppose then I should
> just move its class declaration into a header so it can be seen from
> outside SCCP.cpp. Would creating a new include/llvm/Transforms/SCCP.h be
> the right idea?

You could do that, but SCCPSolver isn't really useful to mainline LLVM for 
anything other than SCCP and IPSCCP, so we don't need it in a public 
header.  Out of curiosity, what are you looking to use the latice values 
for?  Why not just run SCCP and then look at the transformed code?



More information about the llvm-dev mailing list