From 8f59b46750767921e9ca398fadbffb1bd3268246 Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Wed, 9 Feb 2011 21:52:03 +0000 Subject: 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 --- llvm/lib/CodeGen/LiveIntervalUnion.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'llvm/lib/CodeGen/LiveIntervalUnion.cpp') 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(); -- cgit v1.2.3