aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-01-01 20:39:18 +0000
committerChris Lattner <sabre@nondot.org>2011-01-01 20:39:18 +0000
commit0fd8ee4995193ba8dc24a19ae11cd2614418231a (patch)
tree9e36fdd50d182ea4fcc6773e9b69f483ef357f35
parent4d7286083537833880901953d29786cf831affc4 (diff)
turn on memset idiom recognition by default. Though there are still lots of
limitations, this kicks in dozens of times in the 4 specfp2000 benchmarks, and hundreds of times in the int part. It also kicks in hundreds of times in multisource. This kicks in right before loop deletion, which has the pleasant effect of deleting loops that *just* do a memset. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122664 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Support/StandardPasses.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/llvm/Support/StandardPasses.h b/include/llvm/Support/StandardPasses.h
index a608f2ceab..7e32f1fbae 100644
--- a/include/llvm/Support/StandardPasses.h
+++ b/include/llvm/Support/StandardPasses.h
@@ -145,6 +145,7 @@ namespace llvm {
PM->add(createLoopUnswitchPass(OptimizeSize || OptimizationLevel < 3));
PM->add(createInstructionCombiningPass());
PM->add(createIndVarSimplifyPass()); // Canonicalize indvars
+ PM->add(createLoopIdiomPass()); // Recognize idioms like memset.
PM->add(createLoopDeletionPass()); // Delete dead loops
if (UnrollLoops)
PM->add(createLoopUnrollPass()); // Unroll small loops