diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-10-30 07:23:49 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-10-30 07:23:49 +0000 |
commit | 50222db00ac2476de6d76e599d8dd2baa4e5e244 (patch) | |
tree | 97b03063656c89b8723afc52b7859156ac9489ec /include | |
parent | ddb16df91257e4c4d2be5343e2c7c7ecbfbe8bf4 (diff) | |
download | external_llvm-50222db00ac2476de6d76e599d8dd2baa4e5e244.zip external_llvm-50222db00ac2476de6d76e599d8dd2baa4e5e244.tar.gz external_llvm-50222db00ac2476de6d76e599d8dd2baa4e5e244.tar.bz2 |
Rather than having llvm-gcc changing the meaning of OptimizeSize, just make sure loop unswitch is conservative when optimization level is < 3.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85581 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Support/StandardPasses.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/Support/StandardPasses.h b/include/llvm/Support/StandardPasses.h index 611e786..e36f83d 100644 --- a/include/llvm/Support/StandardPasses.h +++ b/include/llvm/Support/StandardPasses.h @@ -128,7 +128,7 @@ namespace llvm { PM->add(createReassociatePass()); // Reassociate expressions PM->add(createLoopRotatePass()); // Rotate Loop PM->add(createLICMPass()); // Hoist loop invariants - PM->add(createLoopUnswitchPass(OptimizeSize)); + PM->add(createLoopUnswitchPass(OptimizeSize || OptimizationLevel < 3)); PM->add(createInstructionCombiningPass()); PM->add(createIndVarSimplifyPass()); // Canonicalize indvars PM->add(createLoopDeletionPass()); // Delete dead loops |