Hi all,
I try to keep my code in sync with recent changes made to trunk (coming
from 3.6).
I see the FunctionPassManager has changed and I see there's a legacy
version, but I try to keep up with the mainstream and prefer to use
non-legacy stuff.
I also see that the examples were not updated.
Before I could do
llvm::FunctionPassManager *functionPassManager = new
llvm::FunctionPassManager(Mod);
functionPassManager->add(llvm::createBasicAliasAnalysisPass());
Now, the createBasicAliasAnalysisPass() is no longer there.
But I see there's a void PassManagerBuilder::addInitialAliasAnalysisPasses.
Is this what I should use now?
Also, I couldn't figure out equivalent code for this:
targetMachine->addAnalysisPasses(*functionPassManager);
functionPassManager->add(new
llvm::TargetLibraryInfo(llvm::Triple(Mod->getTargetTriple())));
functionPassManager->add(new llvm::DataLayoutPass());
Thanks,
Frank
FWIW the new PassManager probably isn't quite ready yet, as I understand it, so you may be best off sticking with the legacy stuff for now. The naming's perhaps a bit unfortunate, but was chosen this way to reduce some of the renaming churn, if I recall correctly (though I can't quite recall exactly why/how). On Thu, Feb 18, 2016 at 1:43 PM, Frank Winter via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Hi all, > > I try to keep my code in sync with recent changes made to trunk (coming > from 3.6). > > I see the FunctionPassManager has changed and I see there's a legacy > version, but I try to keep up with the mainstream and prefer to use > non-legacy stuff. > > I also see that the examples were not updated. > > Before I could do > > llvm::FunctionPassManager *functionPassManager = new > llvm::FunctionPassManager(Mod); > functionPassManager->add(llvm::createBasicAliasAnalysisPass()); > > Now, the createBasicAliasAnalysisPass() is no longer there. > > But I see there's a void PassManagerBuilder::addInitialAliasAnalysisPasses. > > Is this what I should use now? > > Also, I couldn't figure out equivalent code for this: > > targetMachine->addAnalysisPasses(*functionPassManager); > functionPassManager->add(new > llvm::TargetLibraryInfo(llvm::Triple(Mod->getTargetTriple()))); > functionPassManager->add(new llvm::DataLayoutPass()); > > > Thanks, > Frank > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160219/f5d5b8d9/attachment.html>
Just started playing catchup to trunk myself. It seems that ` createBasicAliasAnalysisPass()` is now `createBasicAAWrapperPass()`. -Josh On Thu, Feb 18, 2016 at 4:43 PM, Frank Winter via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Hi all, > > I try to keep my code in sync with recent changes made to trunk (coming > from 3.6). > > I see the FunctionPassManager has changed and I see there's a legacy > version, but I try to keep up with the mainstream and prefer to use > non-legacy stuff. > > I also see that the examples were not updated. > > Before I could do > > llvm::FunctionPassManager *functionPassManager = new > llvm::FunctionPassManager(Mod); > functionPassManager->add(llvm::createBasicAliasAnalysisPass()); > > Now, the createBasicAliasAnalysisPass() is no longer there. > > But I see there's a void PassManagerBuilder::addInitialAliasAnalysisPasses. > > Is this what I should use now? > > Also, I couldn't figure out equivalent code for this: > > targetMachine->addAnalysisPasses(*functionPassManager); > functionPassManager->add(new > llvm::TargetLibraryInfo(llvm::Triple(Mod->getTargetTriple()))); > functionPassManager->add(new llvm::DataLayoutPass()); > > > Thanks, > Frank > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160427/36f99bbf/attachment.html>