mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-28 15:33:16 +00:00
Random cleanup: No need to use a std::vector here, since createInternalizePass uses an ArrayRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189632 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2612354594
commit
6e4d93b232
@ -276,11 +276,8 @@ void PassManagerBuilder::populateLTOPassManager(PassManagerBase &PM,
|
||||
// Now that composite has been compiled, scan through the module, looking
|
||||
// for a main function. If main is defined, mark all other functions
|
||||
// internal.
|
||||
if (Internalize) {
|
||||
std::vector<const char*> E;
|
||||
E.push_back("main");
|
||||
PM.add(createInternalizePass(E));
|
||||
}
|
||||
if (Internalize)
|
||||
PM.add(createInternalizePass("main"));
|
||||
|
||||
// Propagate constants at call sites into the functions they call. This
|
||||
// opens opportunities for globalopt (and inlining) by substituting function
|
||||
@ -321,6 +318,7 @@ void PassManagerBuilder::populateLTOPassManager(PassManagerBase &PM,
|
||||
// The IPO passes may leave cruft around. Clean up after them.
|
||||
PM.add(createInstructionCombiningPass());
|
||||
PM.add(createJumpThreadingPass());
|
||||
|
||||
// Break up allocas
|
||||
if (UseNewSROA)
|
||||
PM.add(createSROAPass());
|
||||
@ -334,6 +332,7 @@ void PassManagerBuilder::populateLTOPassManager(PassManagerBase &PM,
|
||||
PM.add(createLICMPass()); // Hoist loop invariants.
|
||||
PM.add(createGVNPass(DisableGVNLoadPRE)); // Remove redundancies.
|
||||
PM.add(createMemCpyOptPass()); // Remove dead memcpys.
|
||||
|
||||
// Nuke dead stores.
|
||||
PM.add(createDeadStoreEliminationPass());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user