summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineLICM.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2010-10-08 18:59:19 +0000
committerEvan Cheng <evan.cheng@apple.com>2010-10-08 18:59:19 +0000
commit4ac0d16c40e7d25e98805565c6e5d8ff9c10d15d (patch)
treeb218072ee0573c17be08990f4d4cf8e9ad870b8e /llvm/lib/CodeGen/MachineLICM.cpp
parent8c5e7e51bdc5adb106a3315ba1cd075e297d86ff (diff)
downloadbcm5719-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/CodeGen/MachineLICM.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineLICM.cpp4
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.
OpenPOWER on IntegriCloud