[llvm] r175603 - Move the computation of the IsEarlyClobber flag into its own loop, since the
Cameron Zwarich
zwarich at apple.com
Tue Feb 19 22:46:46 PST 2013
Author: zwarich
Date: Wed Feb 20 00:46:46 2013
New Revision: 175603
URL: http://llvm.org/viewvc/llvm-project?rev=175603&view=rev
Log:
Move the computation of the IsEarlyClobber flag into its own loop, since the
correct value is needed in every iteration of the loop for updating
LiveIntervals.
Modified:
llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp
Modified: llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp?rev=175603&r1=175602&r2=175603&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp (original)
+++ llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp Wed Feb 20 00:46:46 2013
@@ -1215,6 +1215,11 @@ TwoAddressInstructionPass::processTiedPa
TiedPairList &TiedPairs,
unsigned &Dist) {
bool IsEarlyClobber = false;
+ for (unsigned tpi = 0, tpe = TiedPairs.size(); tpi != tpe; ++tpi) {
+ const MachineOperand &DstMO = MI->getOperand(TiedPairs[tpi].second);
+ IsEarlyClobber |= DstMO.isEarlyClobber();
+ }
+
bool RemovedKillFlag = false;
bool AllUsesCopied = true;
unsigned LastCopiedReg = 0;
@@ -1225,7 +1230,6 @@ TwoAddressInstructionPass::processTiedPa
const MachineOperand &DstMO = MI->getOperand(DstIdx);
unsigned RegA = DstMO.getReg();
- IsEarlyClobber |= DstMO.isEarlyClobber();
// Grab RegB from the instruction because it may have changed if the
// instruction was commuted.
More information about the llvm-commits
mailing list