aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CriticalAntiDepBreaker.h
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2010-11-02 18:16:45 +0000
committerAndrew Trick <atrick@apple.com>2010-11-02 18:16:45 +0000
commit46388526963aba92344ee8ebd9e86d3556baa088 (patch)
treea107c6f7bf05364db2a2bd5090797ff94afb19d2 /lib/CodeGen/CriticalAntiDepBreaker.h
parentec6f096c36f4144ff9b3b24c2939720cdcbb7bcc (diff)
Fixes <rdar://problem/8612856>: During postRAsched, the antidependence
breaker needs to check all definitions of the antidepenent register to avoid multiple defs of the same new register. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118032 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CriticalAntiDepBreaker.h')
-rw-r--r--lib/CodeGen/CriticalAntiDepBreaker.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/CodeGen/CriticalAntiDepBreaker.h b/lib/CodeGen/CriticalAntiDepBreaker.h
index 0ed7c35b0f..df21ef2834 100644
--- a/lib/CodeGen/CriticalAntiDepBreaker.h
+++ b/lib/CodeGen/CriticalAntiDepBreaker.h
@@ -50,6 +50,8 @@ class TargetRegisterInfo;
/// RegRegs - Map registers to all their references within a live range.
std::multimap<unsigned, MachineOperand *> RegRefs;
+ typedef std::multimap<unsigned, MachineOperand *>::const_iterator
+ RegRefIter;
/// KillIndices - The index of the most recent kill (proceding bottom-up),
/// or ~0u if the register is not live.
@@ -90,10 +92,14 @@ class TargetRegisterInfo;
private:
void PrescanInstruction(MachineInstr *MI);
void ScanInstruction(MachineInstr *MI, unsigned Count);
- unsigned findSuitableFreeRegister(MachineInstr *MI,
+ bool isNewRegModifiedByRefs(RegRefIter RegRefBegin,
+ RegRefIter RegRefEnd,
+ unsigned NewReg);
+ unsigned findSuitableFreeRegister(RegRefIter RegRefBegin,
+ RegRefIter RegRefEnd,
unsigned AntiDepReg,
unsigned LastNewReg,
- const TargetRegisterClass *);
+ const TargetRegisterClass *RC);
};
}