From 7d23be25abb776ed34b7901df4485dc26d2b39a0 Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Sun, 13 Mar 2011 01:29:32 +0000 Subject: [PATCH] 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 --- lib/CodeGen/LiveIntervalUnion.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/CodeGen/LiveIntervalUnion.h b/lib/CodeGen/LiveIntervalUnion.h index 6f9c5f4455e..3734c7f4913 100644 --- a/lib/CodeGen/LiveIntervalUnion.h +++ b/lib/CodeGen/LiveIntervalUnion.h @@ -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 {