Skip to content

Commit 95ee0b0

Browse files
committed
Turn on the IPCP pass by default. It has passed all of the tests
llvm-svn: 9435
1 parent 739811d commit 95ee0b0

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

llvm/tools/gccas/gccas.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,12 @@ void AddConfiguredTransformationPasses(PassManager &PM) {
5656
PM.add(createVerifierPass()); // Verify that input is correct
5757
addPass(PM, createLowerSetJmpPass()); // Lower llvm.setjmp/.longjmp
5858
addPass(PM, createFunctionResolvingPass()); // Resolve (...) functions
59+
addPass(PM, createCFGSimplificationPass()); // Clean up disgusting code
5960
addPass(PM, createRaiseAllocationsPass()); // call %malloc -> malloc inst
6061
addPass(PM, createGlobalDCEPass()); // Remove unused globals
62+
addPass(PM, createIPConstantPropagationPass());// IP Constant Propagation
63+
addPass(PM, createDeadArgEliminationPass()); // Dead argument elimination
64+
6165
addPass(PM, createPruneEHPass()); // Remove dead EH info
6266

6367
if (!DisableInline)

llvm/tools/gccld/GenerateCode.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ GenerateBytecode (Module *M, bool Strip, bool Internalize, std::ostream *Out) {
6868
Passes.add(createInternalizePass());
6969
}
7070

71+
// Propagate constants at call sites into the functions they call.
72+
Passes.add(createIPConstantPropagationPass());
73+
7174
// Remove unused arguments from functions...
7275
Passes.add(createDeadArgEliminationPass());
7376

0 commit comments

Comments
 (0)