Hi Chandler and All , Thank you for the new design on the pass manager , http://llvm.org/devmtg/2014-10/Slides/Carruth-TheLLVMPassManagerPart2.pdf We are coming up with new module pass ,that uses the region pass analysis (RPM),we have few queries like , a)can we model our requirements with your new design ,using the ModelToFunctionPassAdaptor /Proxies ? b)Region Pass /Region Pass Manager uses the legacy pass manager and not refactored to new design ,Do you have plans for it ? c)Any document for your new design ,other than mail threads or ppt doc ? Will be highly appreciate any inputs here ~Umesh -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161103/1b60cee3/attachment.html>
Hi Chandler and everyone , To be specific , We have the module pass ,that get the Function analysis Pass (RegionInfo) for each function and get populated to the vector RegionTree as show below . (assumption we have is that ,Every module has less than 16 functions for testing ) namespace { struct TestPass : public ModulePass { static char ID; // Pass identification, replacement for typeid SmallVector<RegionInfo , 16> RegionTree; TestPass() : ModulePass(ID) { } bool runOnModule(Module &M) override { if (skipModule(M)) return false; for (Function &Func : M) { if (!Func.isDeclaration() && !Func.hasAvailableExternallyLinkage()) { RegionTree.push_back(std::move(this->getAnalysis<RegionInfoPass>(Func).getRegionInfo())); } } for (SmallVectorImpl<RegionInfo>::iterator RI = RegionTree.begin(), RE = RegionTree.end(); RI != RE; ++RI) { RI->dump(); } return false; } void getAnalysisUsage(AnalysisUsage &AU) const override { AU.addRequired<DominatorTreeWrapperPass>(); AU.addRequired<RegionInfoPass>(); } }; } char TestPass::ID = 0; static RegisterPass<TestPass> Z("testpass", "region Pass"); Question is ,Can you(chandler ) or anyone in the dev list ,please help us to port the above module pass to new pass manager design ? Any Doc or source will help us a lot Thank you ~Umesh On Thu, Nov 3, 2016 at 2:48 PM, Umesh Kalappa <umesh.kalappa0 at gmail.com> wrote:> Hi Chandler and All , > > Thank you for the new design on the pass manager , > http://llvm.org/devmtg/2014-10/Slides/Carruth-TheLLVMPassManagerPart2.pdf > > We are coming up with new module pass ,that uses the region pass analysis > (RPM),we have few queries like , > > a)can we model our requirements with your new design ,using the > ModelToFunctionPassAdaptor /Proxies ? > > b)Region Pass /Region Pass Manager uses the legacy pass manager and not > refactored to new design ,Do you have plans for it ? > > c)Any document for your new design ,other than mail threads or ppt doc ? > > Will be highly appreciate any inputs here > ~Umesh >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161104/c7de2439/attachment.html>
Chandler Carruth via llvm-dev
2016-Nov-04 18:21 UTC
[llvm-dev] New Pass Manager Design ....
On Thu, Nov 3, 2016 at 2:18 AM Umesh Kalappa <umesh.kalappa0 at gmail.com> wrote:> Hi Chandler and All , > > Thank you for the new design on the pass manager , > http://llvm.org/devmtg/2014-10/Slides/Carruth-TheLLVMPassManagerPart2.pdf > > We are coming up with new module pass ,that uses the region pass analysis > (RPM),we have few queries like , > > a)can we model our requirements with your new design ,using the > ModelToFunctionPassAdaptor /Proxies ? >Almost certainly.> > b)Region Pass /Region Pass Manager uses the legacy pass manager and not > refactored to new design ,Do you have plans for it ? >I don't have any specific plans here. But I think it should be possible to port. However, analysis-driven pass management is the most complicated part of this, and is only just now stabilizing after several iterations to figure out a design that works well. I think it may be useful to watch how the Loop pass manager and analyses are ported to the end-state design in the next few months as an indication of what this will likely look like for regions. That said, I don't currently plan to work a lot on the region infrastructure in the near future, so if this is something you're interested in I would definitely encourage you to dig into it and work on it.> c)Any document for your new design ,other than mail threads or ppt doc ? >At the moment, the header comments are the best documentation. The design, especially around analysis-based passes remains somewhat in flux. I'm definitely planning to write up more detailed documentation as the design starts to stabilize. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161104/e3f90b0e/attachment.html>