diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-08-11 21:18:34 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-08-11 21:18:34 +0000 |
commit | da4f0eb12c166649711b830a7e8d2ee4fdaa2626 (patch) | |
tree | f67a3a8760b9e1fe87b7b9c7c1f2ec9014fa733a /llvm/lib/CodeGen/LiveIntervalUnion.cpp | |
parent | d886f8cd8dd657116790ee692d92bd55bf8068ae (diff) | |
download | bcm5719-llvm-da4f0eb12c166649711b830a7e8d2ee4fdaa2626.tar.gz bcm5719-llvm-da4f0eb12c166649711b830a7e8d2ee4fdaa2626.zip |
Remove more dead code.
collectInterferingVRegs will be the primary function for interference
checks.
llvm-svn: 137354
Diffstat (limited to 'llvm/lib/CodeGen/LiveIntervalUnion.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LiveIntervalUnion.cpp | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalUnion.cpp b/llvm/lib/CodeGen/LiveIntervalUnion.cpp index b30e169ee0f..cf5fb6a09f1 100644 --- a/llvm/lib/CodeGen/LiveIntervalUnion.cpp +++ b/llvm/lib/CodeGen/LiveIntervalUnion.cpp @@ -181,32 +181,6 @@ LiveIntervalUnion::Query::firstInterference() { return FirstInterference; } -// Treat the result as an iterator and advance to the next interfering pair -// of segments. This is a plain iterator with no filter. -bool LiveIntervalUnion::Query::nextInterference(InterferenceResult &IR) const { - assert(isInterference(IR) && "iteration past end of interferences"); - - // Advance either the VirtReg or LiveUnion segment to ensure that we visit all - // unique overlapping pairs. - if (IR.VirtRegI->end < IR.LiveUnionI.stop()) { - if (++IR.VirtRegI == VirtReg->end()) - return false; - } - else { - if (!(++IR.LiveUnionI).valid()) { - IR.VirtRegI = VirtReg->end(); - return false; - } - } - // Short-circuit findIntersection() if possible. - if (overlap(*IR.VirtRegI, IR.LiveUnionI)) - return true; - - // Find the next intersection. - findIntersection(IR); - return isInterference(IR); -} - // Scan the vector of interfering virtual registers in this union. Assume it's // quite small. bool LiveIntervalUnion::Query::isSeenInterference(LiveInterval *VirtReg) const { @@ -226,6 +200,8 @@ bool LiveIntervalUnion::Query::isSeenInterference(LiveInterval *VirtReg) const { // For comments on how to speed it up, see Query::findIntersection(). unsigned LiveIntervalUnion::Query:: collectInterferingVRegs(unsigned MaxInterferingRegs) { + if (InterferingVRegs.size() >= MaxInterferingRegs) + return InterferingVRegs.size(); InterferenceResult IR = firstInterference(); LiveInterval::iterator VirtRegEnd = VirtReg->end(); LiveInterval *RecentInterferingVReg = NULL; |