diff options
| author | Cameron Zwarich <zwarich@apple.com> | 2013-02-20 06:46:46 +0000 |
|---|---|---|
| committer | Cameron Zwarich <zwarich@apple.com> | 2013-02-20 06:46:46 +0000 |
| commit | 2991feb0d3ce3989340b39f19110b1c645bcea10 (patch) | |
| tree | fd383a5ad4bc967468d3c80cfcdea3594521d6d0 /llvm/lib/CodeGen | |
| parent | c04679f0334d5bab8f1a67785cd1418095fb2e70 (diff) | |
| download | bcm5719-llvm-2991feb0d3ce3989340b39f19110b1c645bcea10.tar.gz bcm5719-llvm-2991feb0d3ce3989340b39f19110b1c645bcea10.zip | |
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.
llvm-svn: 175603
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/TwoAddressInstructionPass.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp b/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp index f5d41c786af..cf14b4dea60 100644 --- a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp +++ b/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp @@ -1215,6 +1215,11 @@ TwoAddressInstructionPass::processTiedPairs(MachineInstr *MI, 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::processTiedPairs(MachineInstr *MI, 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. |

