Now that we are deleting unused live intervals during allocation, pointers may be reused.

Use the virtual register number as a cache tag instead. They are not reused.

llvm-svn: 127561
This commit is contained in:
Jakob Stoklund Olesen 2011-03-13 01:29:32 +00:00
parent 43a87501b3
commit e1539cc5b6
1 changed files with 4 additions and 2 deletions

View 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 {