Move the InterferenceCache cursor into the GlobalSplitCand struct.
[oota-llvm.git] / lib / CodeGen / InterferenceCache.h
index 6c36fa4021fb0195c7cce014ce1c5d6c724f961a..6434b3a788de9ca6f1b1a66f2e17caa9b98cb75a 100644 (file)
@@ -127,10 +127,14 @@ public:
     Entry *CacheEntry;
     BlockInterference *Current;
   public:
-    /// Cursor - Create a cursor for the interference allocated to PhysReg and
-    /// all its aliases.
-    Cursor(InterferenceCache &Cache, unsigned PhysReg)
-      : CacheEntry(Cache.get(PhysReg)), Current(0) {}
+    /// Cursor - Create a dangling cursor.
+    Cursor() : CacheEntry(0), Current(0) {}
+
+    /// setPhysReg - Point this cursor to PhysReg's interference.
+    void setPhysReg(InterferenceCache &Cache, unsigned PhysReg) {
+      CacheEntry = Cache.get(PhysReg);
+      Current = 0;
+    }
 
     /// moveTo - Move cursor to basic block MBBNum.
     void moveToBlock(unsigned MBBNum) {