diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-03-16 22:56:16 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-03-16 22:56:16 +0000 |
commit | 1d5b84508173b93faf513032b3847152e6060791 (patch) | |
tree | 739e46881a412abef08c15ccd609bc5b3b6c682a /lib/CodeGen/LiveRangeEdit.cpp | |
parent | cc5c4296fda7270e8394626d7254596f5f9c8d82 (diff) | |
download | llvm-1d5b84508173b93faf513032b3847152e6060791.tar.gz llvm-1d5b84508173b93faf513032b3847152e6060791.tar.bz2 llvm-1d5b84508173b93faf513032b3847152e6060791.tar.xz |
Add a LiveRangeEdit delegate callback before shrinking a live range.
The register allocator needs to adjust its live interval unions when that happens.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127774 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveRangeEdit.cpp')
-rw-r--r-- | lib/CodeGen/LiveRangeEdit.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/LiveRangeEdit.cpp b/lib/CodeGen/LiveRangeEdit.cpp index e994d8c32d..489d88c1df 100644 --- a/lib/CodeGen/LiveRangeEdit.cpp +++ b/lib/CodeGen/LiveRangeEdit.cpp @@ -201,8 +201,11 @@ void LiveRangeEdit::eliminateDeadDefs(SmallVectorImpl<MachineInstr*> &Dead, break; // Shrink just one live interval. Then delete new dead defs. - LIS.shrinkToUses(ToShrink.back(), &Dead); + LiveInterval *LI = ToShrink.back(); ToShrink.pop_back(); + if (delegate_) + delegate_->LRE_WillShrinkVirtReg(LI->reg); + LIS.shrinkToUses(LI, &Dead); } } |