[llvm-dev] New Pass Manager Design ....
Umesh Kalappa via llvm-dev
llvm-dev at lists.llvm.org
Fri Nov 4 04:53:10 PDT 2016
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>
More information about the llvm-dev
mailing list