Move DisableGVNLoadPRE from populateLTOPassManager to PassManagerBuilder.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216174 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2014-08-21 13:13:17 +00:00
parent f19807db70
commit 47199c3d0c
5 changed files with 15 additions and 13 deletions

View File

@ -474,9 +474,11 @@ bool LTOCodeGenerator::generateObjectFile(raw_ostream &out,
// Enabling internalize here would use its AllButMain variant. It
// keeps only main if it exists and does nothing for libraries. Instead
// we create the pass ourselves with the symbol list provided by the linker.
if (!DisableOpt)
PassManagerBuilder().populateLTOPassManager(passes, !DisableInline,
DisableGVNLoadPRE);
if (!DisableOpt) {
PassManagerBuilder PMB;
PMB.DisableGVNLoadPRE = DisableGVNLoadPRE;
PMB.populateLTOPassManager(passes, !DisableInline);
}
// Make sure everything is still good.
passes.add(createVerifierPass());