1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00

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 2d87d5139b
commit 7d23be25ab

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 {