[llvm-commits] [llvm] r122664 - /llvm/trunk/include/llvm/Support/StandardPasses.h

Chris Lattner sabre at nondot.org
Sat Jan 1 12:39:18 PST 2011

Author: lattner
Date: Sat Jan  1 14:39:18 2011
New Revision: 122664

URL: http://llvm.org/viewvc/llvm-project?rev=122664&view=rev
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.


Modified: llvm/trunk/include/llvm/Support/StandardPasses.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/StandardPasses.h?rev=122664&r1=122663&r2=122664&view=diff
--- llvm/trunk/include/llvm/Support/StandardPasses.h (original)
+++ llvm/trunk/include/llvm/Support/StandardPasses.h Sat Jan  1 14:39:18 2011
@@ -145,6 +145,7 @@
     PM->add(createLoopUnswitchPass(OptimizeSize || OptimizationLevel < 3));
     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

More information about the llvm-commits mailing list