diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-12-22 04:47:41 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-12-22 04:47:41 +0000 |
| commit | f3ef2cada74bfc315150c1c3dbf6b8cafce2eeb0 (patch) | |
| tree | 294c05a0b43a14be529ecc64e11ed6172431aaaa /llvm/include | |
| parent | 9b7d99eb76f6e72b7f08e0a66c16f4f0a1b00e60 (diff) | |
| download | bcm5719-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.h | 3 |
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 |

