diff options
Diffstat (limited to 'lib/CodeGen/LiveIntervalUnion.h')
-rw-r--r-- | lib/CodeGen/LiveIntervalUnion.h | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/lib/CodeGen/LiveIntervalUnion.h b/lib/CodeGen/LiveIntervalUnion.h index a024bde581..7f494474f9 100644 --- a/lib/CodeGen/LiveIntervalUnion.h +++ b/lib/CodeGen/LiveIntervalUnion.h @@ -187,27 +187,9 @@ public: return *VirtReg; } - bool isInterference(const InterferenceResult &IR) const { - if (IR.VirtRegI != VirtReg->end()) { - assert(overlap(*IR.VirtRegI, IR.LiveUnionI) && - "invalid segment iterators"); - return true; - } - return false; - } - // Does this live virtual register interfere with the union? bool checkInterference() { return isInterference(firstInterference()); } - // Get the first pair of interfering segments, or a noninterfering result. - // This initializes the firstInterference_ cache. - const InterferenceResult &firstInterference(); - - // Treat the result as an iterator and advance to the next interfering pair - // of segments. Visiting each unique interfering pairs means that the same - // VirtReg or LiveUnion segment may be visited multiple times. - bool nextInterference(InterferenceResult &IR) const; - // Count the virtual registers in this union that interfere with this // query's live virtual register, up to maxInterferingRegs. unsigned collectInterferingVRegs(unsigned MaxInterferingRegs = UINT_MAX); @@ -235,7 +217,18 @@ public: void operator=(const Query&); // DO NOT IMPLEMENT // Private interface for queries + const InterferenceResult &firstInterference(); + bool nextInterference(InterferenceResult &IR) const; void findIntersection(InterferenceResult &IR) const; + + bool isInterference(const InterferenceResult &IR) const { + if (IR.VirtRegI != VirtReg->end()) { + assert(overlap(*IR.VirtRegI, IR.LiveUnionI) && + "invalid segment iterators"); + return true; + } + return false; + } }; }; |