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? Nick Lewycky
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. -Chris -- http://nondot.org/sabre/ http://llvm.org/
Chris Lattner wrote:> 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? Nick Lewycky