summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit8f59b46750767921e9ca398fadbffb1bd3268246 (patch)
tree34790ee2096801bdb0aa1f1dd61df7ac415871e4 /llvm/lib/CodeGen/LiveIntervalUnion.cpp
parentf4dd543d927a5a86585b1d925f20d504366b633d (diff)
downloadbcm5719-llvm-8f59b46750767921e9ca398fadbffb1bd3268246.tar.gz
bcm5719-llvm-8f59b46750767921e9ca398fadbffb1bd3268246.zip
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. llvm-svn: 125224
Diffstat (limited to 'llvm/lib/CodeGen/LiveIntervalUnion.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveIntervalUnion.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalUnion.cpp b/llvm/lib/CodeGen/LiveIntervalUnion.cpp
index 2027db19b75..205f28a0d65 100644
--- a/llvm/lib/CodeGen/LiveIntervalUnion.cpp
+++ b/llvm/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();
OpenPOWER on IntegriCloud