summaryrefslogtreecommitdiff
path: root/lib/CodeGen/LiveIntervalUnion.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-02-09 21:52:03 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-02-09 21:52:03 +0000
commit4f6364fd3f2af74330b1bc4e545173af074707a5 (patch)
treefcf0820ef4d4ba41aa05e00866e32a41cada6b21 /lib/CodeGen/LiveIntervalUnion.cpp
parent80fd30563c341d6db778f407547707396ff97c75 (diff)
downloadllvm-4f6364fd3f2af74330b1bc4e545173af074707a5.tar.gz
llvm-4f6364fd3f2af74330b1bc4e545173af074707a5.tar.bz2
llvm-4f6364fd3f2af74330b1bc4e545173af074707a5.tar.xz
Add tags to live interval unions to avoid using stale queries.
The tag is updated whenever the live interval union is changed, and it is tested before using cached information. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125224 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveIntervalUnion.cpp')
-rw-r--r--lib/CodeGen/LiveIntervalUnion.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/LiveIntervalUnion.cpp b/lib/CodeGen/LiveIntervalUnion.cpp
index 2027db19b7..205f28a0d6 100644
--- a/lib/CodeGen/LiveIntervalUnion.cpp
+++ b/lib/CodeGen/LiveIntervalUnion.cpp
@@ -28,6 +28,7 @@ using namespace llvm;
void LiveIntervalUnion::unify(LiveInterval &VirtReg) {
if (VirtReg.empty())
return;
+ ++Tag;
// Insert each of the virtual register's live segments into the map.
LiveInterval::iterator RegPos = VirtReg.begin();
@@ -46,6 +47,7 @@ void LiveIntervalUnion::unify(LiveInterval &VirtReg) {
void LiveIntervalUnion::extract(LiveInterval &VirtReg) {
if (VirtReg.empty())
return;
+ ++Tag;
// Remove each of the virtual register's live segments from the map.
LiveInterval::iterator RegPos = VirtReg.begin();