summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LiveIntervalUnion.h
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2010-11-09 21:04:34 +0000
committerAndrew Trick <atrick@apple.com>2010-11-09 21:04:34 +0000
commit488660554e6b4d88d3c181c2f9efa879021f055b (patch)
tree1a7a134ca26ecd716d182d3a0e780de363afe26d /llvm/lib/CodeGen/LiveIntervalUnion.h
parentdbee986290a2d5df5a92b7b54ce1abd1e4831fca (diff)
downloadbcm5719-llvm-488660554e6b4d88d3c181c2f9efa879021f055b.tar.gz
bcm5719-llvm-488660554e6b4d88d3c181c2f9efa879021f055b.zip
Adds RABasic verification and tracing.
(retry now that the windows build is green) llvm-svn: 118630
Diffstat (limited to 'llvm/lib/CodeGen/LiveIntervalUnion.h')
-rw-r--r--llvm/lib/CodeGen/LiveIntervalUnion.h23
1 files changed, 21 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalUnion.h b/llvm/lib/CodeGen/LiveIntervalUnion.h
index cb07653368a..74499f68215 100644
--- a/llvm/lib/CodeGen/LiveIntervalUnion.h
+++ b/llvm/lib/CodeGen/LiveIntervalUnion.h
@@ -23,6 +23,12 @@
namespace llvm {
+#ifndef NDEBUG
+// forward declaration
+template <unsigned Element> class SparseBitVector;
+typedef SparseBitVector<128> LvrBitSet;
+#endif
+
/// A LiveSegment is a copy of a LiveRange object used within
/// LiveIntervalUnion. LiveSegment additionally contains a pointer to its
/// original live virtual register (LiveInterval). This allows quick lookup of
@@ -51,6 +57,9 @@ struct LiveSegment {
// Order segments by starting point only--we expect them to be disjoint.
bool operator<(const LiveSegment &ls) const { return start < ls.start; }
+
+ void dump() const;
+ void print(raw_ostream &os) const;
};
inline bool operator<(SlotIndex V, const LiveSegment &ls) {
@@ -74,9 +83,9 @@ raw_ostream& operator<<(raw_ostream& os, const LiveSegment &ls);
class AbstractRegisterDescription {
public:
virtual const char *getName(unsigned reg) const = 0;
- virtual ~AbstractRegisterDescription() { }
+ virtual ~AbstractRegisterDescription() {}
};
-
+
/// Union of live intervals that are strong candidates for coalescing into a
/// single register (either physical or virtual depending on the context). We
/// expect the constituent live intervals to be disjoint, although we may
@@ -133,6 +142,16 @@ public:
// Remove a live virtual register's segments from this union.
void extract(const LiveInterval &lvr);
+ void dump(const AbstractRegisterDescription *regInfo) const;
+
+ // If tri != NULL, use it to decode repReg_
+ void print(raw_ostream &os, const AbstractRegisterDescription *rdesc) const;
+
+#ifndef NDEBUG
+ // Verify the live intervals in this union and add them to the visited set.
+ void verify(LvrBitSet& visitedVRegs);
+#endif
+
/// Cache a single interference test result in the form of two intersecting
/// segments. This allows efficiently iterating over the interferences. The
/// iteration logic is handled by LiveIntervalUnion::Query which may
OpenPOWER on IntegriCloud