Skip to content
This repository has been archived by the owner on Apr 23, 2020. It is now read-only.

Commit

Permalink
Couple more sets of tidying.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177920 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
echristo committed Mar 25, 2013
1 parent 1f7fe80 commit 57d7607
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/CodeGen/StackColoring.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ void StackColoring::remapInstructions(DenseMap<int, int> &SlotRemap) {
SlotIndex Index = Indexes->getInstructionIndex(I); SlotIndex Index = Indexes->getInstructionIndex(I);
LiveInterval *Interval = Intervals[FromSlot]; LiveInterval *Interval = Intervals[FromSlot];
assert(Interval->find(Index) != Interval->end() && assert(Interval->find(Index) != Interval->end() &&
"Found instruction usage outside of live range."); "Found instruction usage outside of live range.");
} }
#endif #endif


Expand Down Expand Up @@ -741,9 +741,9 @@ bool StackColoring::runOnMachineFunction(MachineFunction &Func) {
std::stable_sort(SortedSlots.begin(), SortedSlots.end(), std::stable_sort(SortedSlots.begin(), SortedSlots.end(),
SlotSizeSorter(MFI)); SlotSizeSorter(MFI));


bool Chanded = true; bool Changed = true;
while (Chanded) { while (Changed) {
Chanded = false; Changed = false;
for (unsigned I = 0; I < NumSlots; ++I) { for (unsigned I = 0; I < NumSlots; ++I) {
if (SortedSlots[I] == -1) if (SortedSlots[I] == -1)
continue; continue;
Expand All @@ -760,7 +760,7 @@ bool StackColoring::runOnMachineFunction(MachineFunction &Func) {


// Merge disjoint slots. // Merge disjoint slots.
if (!First->overlaps(*Second)) { if (!First->overlaps(*Second)) {
Chanded = true; Changed = true;
First->MergeRangesInAsValue(*Second, First->getValNumInfo(0)); First->MergeRangesInAsValue(*Second, First->getValNumInfo(0));
SlotRemap[SecondSlot] = FirstSlot; SlotRemap[SecondSlot] = FirstSlot;
SortedSlots[J] = -1; SortedSlots[J] = -1;
Expand Down

0 comments on commit 57d7607

Please sign in to comment.