summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-02-25 19:24:01 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-02-25 19:24:01 +0000
commit548677022ce365d6c0fddadf91a34b4df9611853 (patch)
treef9de80accfecd832a87fcccd6665d39fd30bd780 /llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
parent8483d4374987c3b78961ab0f0b3be8144c7c20b6 (diff)
downloadbcm5719-llvm-548677022ce365d6c0fddadf91a34b4df9611853.tar.gz
bcm5719-llvm-548677022ce365d6c0fddadf91a34b4df9611853.zip
All remat'ed loads cannot be folded into two-address code. Not just argument loads. This change doesn't really have any impact on codegen.
llvm-svn: 47557
Diffstat (limited to 'llvm/lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveIntervalAnalysis.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
index a13bc43a5ef..716c3701102 100644
--- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -789,7 +789,7 @@ bool LiveIntervals::tryFoldMemoryOperand(MachineInstr* &MI,
/// folding is possible.
bool LiveIntervals::canFoldMemoryOperand(MachineInstr *MI,
SmallVector<unsigned, 2> &Ops,
- bool ReMatLoadSS) const {
+ bool ReMatLoad) const {
// Filter the list of operand indexes that are to be folded. Abort if
// any operand will prevent folding.
unsigned MRInfo = 0;
@@ -797,8 +797,8 @@ bool LiveIntervals::canFoldMemoryOperand(MachineInstr *MI,
if (FilterFoldedOps(MI, Ops, MRInfo, FoldOps))
return false;
- // Can't fold a load from fixed stack slot into a two address instruction.
- if (ReMatLoadSS && (MRInfo & VirtRegMap::isMod))
+ // Can't fold a remat'ed load into a two address instruction.
+ if (ReMatLoad && (MRInfo & VirtRegMap::isMod))
return false;
return tii_->canFoldMemoryOperand(MI, FoldOps);
@@ -951,7 +951,7 @@ rewriteInstructionForSpills(const LiveInterval &li, const VNInfo *VNI,
goto RestartInstruction;
}
} else {
- CanFold = canFoldMemoryOperand(MI, Ops, DefIsReMat && isLoadSS);
+ CanFold = canFoldMemoryOperand(MI, Ops, DefIsReMat && isLoad);
}
} else
CanFold = false;
OpenPOWER on IntegriCloud