diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-02-09 21:52:03 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-02-09 21:52:03 +0000 |
commit | 4f6364fd3f2af74330b1bc4e545173af074707a5 (patch) | |
tree | fcf0820ef4d4ba41aa05e00866e32a41cada6b21 /lib/CodeGen/LiveIntervalUnion.cpp | |
parent | 80fd30563c341d6db778f407547707396ff97c75 (diff) | |
download | llvm-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.cpp | 2 |
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(); |