1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

Don't waste time unfolding simple loads. The unfolded copy won't be hoisted.

llvm-svn: 116081
This commit is contained in:
Evan Cheng 2010-10-08 18:59:19 +00:00
parent b6cde7cdf4
commit 8833658eb0

View File

@ -636,6 +636,10 @@ bool MachineLICM::IsProfitableToHoist(MachineInstr &MI) {
} }
MachineInstr *MachineLICM::ExtractHoistableLoad(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. // If not, we may be able to unfold a load and hoist that.
// First test whether the instruction is loading from an amenable // First test whether the instruction is loading from an amenable
// memory location. // memory location.