[llvm-commits] [llvm] r91886 - /llvm/trunk/include/llvm/Support/StandardPasses.h
Chris Lattner
sabre at nondot.org
Mon Dec 21 20:47:42 PST 2009
Author: lattner
Date: Mon Dec 21 22:47:41 2009
New Revision: 91886
URL: http://llvm.org/viewvc/llvm-project?rev=91886&view=rev
Log:
don't run GVN at -O1, GCC doesn't do it's equivalent at that optimization level.
Modified:
llvm/trunk/include/llvm/Support/StandardPasses.h
Modified: llvm/trunk/include/llvm/Support/StandardPasses.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/StandardPasses.h?rev=91886&r1=91885&r2=91886&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/StandardPasses.h (original)
+++ llvm/trunk/include/llvm/Support/StandardPasses.h Mon Dec 21 22:47:41 2009
@@ -137,7 +137,8 @@
if (UnrollLoops)
PM->add(createLoopUnrollPass()); // Unroll small loops
PM->add(createInstructionCombiningPass()); // Clean up after the unroller
- PM->add(createGVNPass()); // Remove redundancies
+ if (OptimizationLevel > 1)
+ PM->add(createGVNPass()); // Remove redundancies
PM->add(createMemCpyOptPass()); // Remove memcpy / form memset
PM->add(createSCCPPass()); // Constant prop with SCCP
More information about the llvm-commits
mailing list