aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/SimpleRegisterCoalescing.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2008-08-13 21:49:13 +0000
committerOwen Anderson <resistor@mac.com>2008-08-13 21:49:13 +0000
commit348d1d86f8e4ad7f9acc6d2a66c34c54afaa2d9a (patch)
tree1f3e1c1c2dc8bd410854acf3f23f1f619a04f613 /lib/CodeGen/SimpleRegisterCoalescing.cpp
parent30e0563e413fb813ee84457a91bf60a2b6fa0302 (diff)
downloadexternal_llvm-348d1d86f8e4ad7f9acc6d2a66c34c54afaa2d9a.zip
external_llvm-348d1d86f8e4ad7f9acc6d2a66c34c54afaa2d9a.tar.gz
external_llvm-348d1d86f8e4ad7f9acc6d2a66c34c54afaa2d9a.tar.bz2
Make the allocation of LiveIntervals explicit, rather than holding them in the r2iMap_ by value. This will prevent references to them from being invalidated
if the map is changed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54763 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SimpleRegisterCoalescing.cpp')
-rw-r--r--lib/CodeGen/SimpleRegisterCoalescing.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/SimpleRegisterCoalescing.cpp b/lib/CodeGen/SimpleRegisterCoalescing.cpp
index 933465b..b3e3409 100644
--- a/lib/CodeGen/SimpleRegisterCoalescing.cpp
+++ b/lib/CodeGen/SimpleRegisterCoalescing.cpp
@@ -2091,7 +2091,7 @@ bool SimpleRegisterCoalescing::runOnMachineFunction(MachineFunction &fn) {
joinIntervals();
DOUT << "********** INTERVALS POST JOINING **********\n";
for (LiveIntervals::iterator I = li_->begin(), E = li_->end(); I != E; ++I){
- I->second.print(DOUT, tri_);
+ I->second->print(DOUT, tri_);
DOUT << "\n";
}
}
@@ -2164,7 +2164,7 @@ bool SimpleRegisterCoalescing::runOnMachineFunction(MachineFunction &fn) {
}
for (LiveIntervals::iterator I = li_->begin(), E = li_->end(); I != E; ++I) {
- LiveInterval &LI = I->second;
+ LiveInterval &LI = *I->second;
if (TargetRegisterInfo::isVirtualRegister(LI.reg)) {
// If the live interval length is essentially zero, i.e. in every live
// range the use follows def immediately, it doesn't make sense to spill