[llvm-dev] the new FunctionPassManager
Frank Winter via llvm-dev
llvm-dev at lists.llvm.org
Thu Feb 18 13:43:45 PST 2016
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
More information about the llvm-dev
mailing list