summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-12-22 04:47:41 +0000
committerChris Lattner <sabre@nondot.org>2009-12-22 04:47:41 +0000
commitf3ef2cada74bfc315150c1c3dbf6b8cafce2eeb0 (patch)
tree294c05a0b43a14be529ecc64e11ed6172431aaaa /llvm/include
parent9b7d99eb76f6e72b7f08e0a66c16f4f0a1b00e60 (diff)
downloadbcm5719-llvm-f3ef2cada74bfc315150c1c3dbf6b8cafce2eeb0.tar.gz
bcm5719-llvm-f3ef2cada74bfc315150c1c3dbf6b8cafce2eeb0.zip
don't run GVN at -O1, GCC doesn't do it's equivalent at that optimization level.
llvm-svn: 91886
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/Support/StandardPasses.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/include/llvm/Support/StandardPasses.h b/llvm/include/llvm/Support/StandardPasses.h
index 18be1addbf9..f233c18de3b 100644
--- a/llvm/include/llvm/Support/StandardPasses.h
+++ b/llvm/include/llvm/Support/StandardPasses.h
@@ -137,7 +137,8 @@ namespace llvm {
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
OpenPOWER on IntegriCloud