summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-08-30 00:48:37 +0000
committerBill Wendling <isanbard@gmail.com>2013-08-30 00:48:37 +0000
commit4c0d9adecbc06af68d841c099ca8d4dbdf468caa (patch)
tree3eb100050b8eb59b0d11cf3ece714f05aee4c7ca /llvm
parent4b358188c608c26df1f8e6c7406fea4cb43d9f34 (diff)
downloadbcm5719-llvm-4c0d9adecbc06af68d841c099ca8d4dbdf468caa.tar.gz
bcm5719-llvm-4c0d9adecbc06af68d841c099ca8d4dbdf468caa.zip
Random cleanup: No need to use a std::vector here, since createInternalizePass uses an ArrayRef.
llvm-svn: 189632
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Transforms/IPO/PassManagerBuilder.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp b/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
index 68d69a95622..395e3234ca9 100644
--- a/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
+++ b/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
@@ -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());
OpenPOWER on IntegriCloud