diff options
author | Owen Anderson <resistor@mac.com> | 2008-08-13 21:49:13 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2008-08-13 21:49:13 +0000 |
commit | 03857b29d8271a23943254579e6cf7b7df4b1bd3 (patch) | |
tree | 1f3e1c1c2dc8bd410854acf3f23f1f619a04f613 /lib/CodeGen/SimpleRegisterCoalescing.cpp | |
parent | 49bfdd63f481237fa7305525517ea0dc9e1bd23c (diff) |
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.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/SimpleRegisterCoalescing.cpp b/lib/CodeGen/SimpleRegisterCoalescing.cpp index 933465b000..b3e3409da3 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 |