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
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(Func).getRegionInfo()));
}
}
for (SmallVectorImpl::iterator RI = RegionTree.begin(),
RE = RegionTree.end();
RI != RE; ++RI) {
RI->dump();
}
return false;
}
void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.addRequired();
AU.addRequired();
}
};
}
char TestPass::ID = 0;
static RegisterPass
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
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.