diff options
author | Evan Cheng <evan.cheng@apple.com> | 2010-10-08 18:59:19 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2010-10-08 18:59:19 +0000 |
commit | e95f3195b8c65f377a59cc716bfda58c8f7c2f5e (patch) | |
tree | a72638d079f7302018855abf620d6ecd45658d59 /lib/CodeGen | |
parent | 1aca5bc1353d4e2c7706149efbc5393aa9e2cc3f (diff) | |
download | external_llvm-e95f3195b8c65f377a59cc716bfda58c8f7c2f5e.zip external_llvm-e95f3195b8c65f377a59cc716bfda58c8f7c2f5e.tar.gz external_llvm-e95f3195b8c65f377a59cc716bfda58c8f7c2f5e.tar.bz2 |
Don't waste time unfolding simple loads. The unfolded copy won't be hoisted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116081 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/MachineLICM.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/MachineLICM.cpp b/lib/CodeGen/MachineLICM.cpp index 32b7e00..b996d91 100644 --- a/lib/CodeGen/MachineLICM.cpp +++ b/lib/CodeGen/MachineLICM.cpp @@ -636,6 +636,10 @@ bool MachineLICM::IsProfitableToHoist(MachineInstr &MI) { } MachineInstr *MachineLICM::ExtractHoistableLoad(MachineInstr *MI) { + // Don't unfold simple loads. + if (MI->getDesc().canFoldAsLoad()) + return 0; + // If not, we may be able to unfold a load and hoist that. // First test whether the instruction is loading from an amenable // memory location. |