Now that we are deleting unused live intervals during allocation, pointers may be...
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Sun, 13 Mar 2011 01:29:32 +0000 (01:29 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Sun, 13 Mar 2011 01:29:32 +0000 (01:29 +0000)
Use the virtual register number as a cache tag instead. They are not reused.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127561 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/LiveIntervalUnion.h

index 6f9c5f4455e9eb5bd62c09c4e7f137304c38fb6e..3734c7f49138e9fac4e04ccec622ac8aac126590 100644 (file)
@@ -163,7 +163,7 @@ public:
     bool CheckedFirstInterference;
     bool SeenAllInterferences;
     bool SeenUnspillableVReg;
-    unsigned Tag;
+    unsigned Tag, VTag;
 
   public:
     Query(): LiveUnion(), VirtReg() {}
@@ -181,11 +181,12 @@ public:
       SeenAllInterferences = false;
       SeenUnspillableVReg = false;
       Tag = 0;
+      VTag = 0;
     }
 
     void init(LiveInterval *VReg, LiveIntervalUnion *LIU) {
       assert(VReg && LIU && "Invalid arguments");
-      if (VirtReg == VReg && LiveUnion == LIU && !LIU->changedSince(Tag)) {
+      if (VReg->reg == VTag && LiveUnion == LIU && !LIU->changedSince(Tag)) {
         // Retain cached results, e.g. firstInterference.
         return;
       }
@@ -193,6 +194,7 @@ public:
       LiveUnion = LIU;
       VirtReg = VReg;
       Tag = LIU->getTag();
+      VTag = VReg->reg;
     }
 
     LiveInterval &virtReg() const {