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 | 508355c9829bd60bf2afba7068f8d74607152f87 (patch) | |
tree | e9a9614fdff62786121c237854273f585b9b77de /include/llvm | |
parent | 0ee443d169786017d151034b8bd34225bc144c98 (diff) | |
download | external_llvm-508355c9829bd60bf2afba7068f8d74607152f87.zip external_llvm-508355c9829bd60bf2afba7068f8d74607152f87.tar.gz external_llvm-508355c9829bd60bf2afba7068f8d74607152f87.tar.bz2 |
don't run GVN at -O1, GCC doesn't do it's equivalent at that optimization level.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91886 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/Support/StandardPasses.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/llvm/Support/StandardPasses.h b/include/llvm/Support/StandardPasses.h index 18be1ad..f233c18de 100644 --- a/include/llvm/Support/StandardPasses.h +++ b/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 |