aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-01-03 06:19:09 +0000
committerChris Lattner <sabre@nondot.org>2011-01-03 06:19:09 +0000
commitdb5f5e64fe2a7266fe5ed126fa2e92e5c0f71833 (patch)
treec6dfd0e15f224e3de8097f56de5423eb26575a50
parent99597067357dc1275845cf1cbd3e7e8bd242a7f3 (diff)
Turn on earlycse by default. This seems to be a small performance
improvement in the generated code, and speeds up 'opt -std-compile-opts' compile time on 176.gcc from 24.84s to 23.2s (about 7%). This also resolves a specific code quality issue in rdar://7352081 which was generating poor code for: int t(int a, int b) { if (a & b & 1) return a & b; return 3; } git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122740 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Support/StandardPasses.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/Support/StandardPasses.h b/include/llvm/Support/StandardPasses.h
index 7e32f1fbae..6a428e7b4d 100644
--- a/include/llvm/Support/StandardPasses.h
+++ b/include/llvm/Support/StandardPasses.h
@@ -129,9 +129,9 @@ namespace llvm {
// Start of function pass.
PM->add(createScalarReplAggregatesPass()); // Break up aggregate allocas
+ PM->add(createEarlyCSEPass()); // Catch trivial redundancies
if (SimplifyLibCalls)
PM->add(createSimplifyLibCallsPass()); // Library Call Optimizations
- PM->add(createInstructionCombiningPass()); // Cleanup for scalarrepl.
PM->add(createJumpThreadingPass()); // Thread jumps.
PM->add(createCorrelatedValuePropagationPass()); // Propagate conditionals
PM->add(createCFGSimplificationPass()); // Merge & remove BBs