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 | 4ac0d16c40e7d25e98805565c6e5d8ff9c10d15d (patch) | |
tree | b218072ee0573c17be08990f4d4cf8e9ad870b8e /llvm/lib | |
parent | 8c5e7e51bdc5adb106a3315ba1cd075e297d86ff (diff) | |
download | bcm5719-llvm-4ac0d16c40e7d25e98805565c6e5d8ff9c10d15d.tar.gz bcm5719-llvm-4ac0d16c40e7d25e98805565c6e5d8ff9c10d15d.zip |
Don't waste time unfolding simple loads. The unfolded copy won't be hoisted.
llvm-svn: 116081
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/MachineLICM.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineLICM.cpp b/llvm/lib/CodeGen/MachineLICM.cpp index 32b7e00ce66..b996d916076 100644 --- a/llvm/lib/CodeGen/MachineLICM.cpp +++ b/llvm/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. |