Hi All, I'm relatively new to LLVM (but not optimizing compilers), and have been reading docs and browsing code. I noticed in the 2.4 release notes that a sparse propagation framework had been added based on the SCCP algorithm. I might have a need for exactly this kind of framework in order to prototype an analysis I have in mind. I also noticed, however, that this doesn't appear to be in use at this time. Are there plans to reimplement SCCP and/or other analyses/optimizations using this framework? Is the framework known to generally work? I searched the bug database but didn't find anything that looked related. Thanks, Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090527/a6cf2e6e/attachment.html>
On Wed, May 27, 2009 at 5:26 PM, Mark Lacey <superoptimizer at gmail.com> wrote:> Hi All, >Hi Mark,> I'm relatively new to LLVM (but not optimizing compilers), and have been > reading docs and browsing code. >Bienvenue!> I noticed in the 2.4 release notes that a sparse propagation framework had > been added based on the SCCP algorithm. I might have a need for exactly this > kind of framework in order to prototype an analysis I have in mind. > > I also noticed, however, that this doesn't appear to be in use at this time. >It is being used: opt.cpp: void AddStandardCompilePasses(PassManager &PM) { ... addPass(PM, createSCCPPass()); // Constant prop with SCCP and in gcc/llvm-backend.cpp: static void createPerModuleOptimizationPasses() { ... PM->add(createSCCPPass()); // Constant prop with SCCP -bw
On Wed, May 27, 2009 at 7:11 PM, Bill Wendling <isanbard at gmail.com> wrote:>> I noticed in the 2.4 release notes that a sparse propagation framework had >> been added based on the SCCP algorithm. I might have a need for exactly this >> kind of framework in order to prototype an analysis I have in mind. >> >> I also noticed, however, that this doesn't appear to be in use at this time. >> > It is being used:He's not asking about the SCCP pass, but rather llvm/Analysis/SparsePropagation.h, which is in fact unused at the moment. -Eli
On Wed, May 27, 2009 at 7:11 PM, Bill Wendling <isanbard at gmail.com> wrote:> On Wed, May 27, 2009 at 5:26 PM, Mark Lacey <superoptimizer at gmail.com> > wrote: > > I noticed in the 2.4 release notes that a sparse propagation framework > had > > been added based on the SCCP algorithm. I might have a need for exactly > this > > kind of framework in order to prototype an analysis I have in mind. > > > > I also noticed, however, that this doesn't appear to be in use at this > time. > > > It is being used: > > opt.cpp: > > void AddStandardCompilePasses(PassManager &PM) { > ... > addPass(PM, createSCCPPass()); // Constant prop with > SCCP > > > and in gcc/llvm-backend.cpp: > > static void createPerModuleOptimizationPasses() { > ... > PM->add(createSCCPPass()); // Constant prop > with SCCP >I guess I wasn't clear. I was referring to the code in include/llvm/Analysis/SparsePropagation.h and lib/Analysis/SparsePropagation.cpp which use the same optimistic worklist based algorithm that SCCP uses, but allow for pluggable lattices/transfer-functions via subclassing the AbstractLatticeFunction class. It looks like this was written to be a more general framework that worklist based algorithms (esp. ones that have a notion of executable edges) could be built on, but was never used within LLVM. Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090527/d0d82410/attachment.html>