diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-11-29 09:49:23 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-11-29 09:49:23 +0000 |
commit | c3fc7d9ec9b495c8a88cd854247105c296d3aabd (patch) | |
tree | 686b20aa4906f702dcc3c16396faad2990f942ed /lib/CodeGen/SimpleRegisterCoalescing.cpp | |
parent | fd8890dbee577fbf20798ccf1709a62e2b46f182 (diff) |
Replace the odd kill# hack with something less fragile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44434 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SimpleRegisterCoalescing.cpp')
-rw-r--r-- | lib/CodeGen/SimpleRegisterCoalescing.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/SimpleRegisterCoalescing.cpp b/lib/CodeGen/SimpleRegisterCoalescing.cpp index 4b96cac84d..3d2669becd 100644 --- a/lib/CodeGen/SimpleRegisterCoalescing.cpp +++ b/lib/CodeGen/SimpleRegisterCoalescing.cpp @@ -490,6 +490,7 @@ bool SimpleRegisterCoalescing::JoinCopy(CopyRec TheCopy, bool &Again) { if (CopiedValNos.insert(DstValNo)) { VNInfo *ValNo = RealDstInt.getNextValue(DstValNo->def, DstValNo->reg, li_->getVNInfoAllocator()); + ValNo->hasPHIKill = DstValNo->hasPHIKill; RealDstInt.addKills(ValNo, DstValNo->kills); RealDstInt.MergeValueInAsValue(*ResDstInt, DstValNo, ValNo); } @@ -734,6 +735,7 @@ bool SimpleRegisterCoalescing::SimpleJoin(LiveInterval &LHS, LiveInterval &RHS) // Okay, the final step is to loop over the RHS live intervals, adding them to // the LHS. + LHSValNo->hasPHIKill |= VNI->hasPHIKill; LHS.addKills(LHSValNo, VNI->kills); LHS.MergeRangesInAsValue(RHS, LHSValNo); LHS.weight += RHS.weight; @@ -969,6 +971,7 @@ bool SimpleRegisterCoalescing::JoinIntervals(LiveInterval &LHS, VNInfo *VNI = I->first; unsigned LHSValID = LHSValNoAssignments[VNI->id]; LiveInterval::removeKill(NewVNInfo[LHSValID], VNI->def); + NewVNInfo[LHSValID]->hasPHIKill |= VNI->hasPHIKill; RHS.addKills(NewVNInfo[LHSValID], VNI->kills); } @@ -978,6 +981,7 @@ bool SimpleRegisterCoalescing::JoinIntervals(LiveInterval &LHS, VNInfo *VNI = I->first; unsigned RHSValID = RHSValNoAssignments[VNI->id]; LiveInterval::removeKill(NewVNInfo[RHSValID], VNI->def); + NewVNInfo[RHSValID]->hasPHIKill |= VNI->hasPHIKill; LHS.addKills(NewVNInfo[RHSValID], VNI->kills); } |