File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
llvm/lib/Transforms/Scalar Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -627,11 +627,8 @@ class AllocaSlices {
627
627
// / everything so that the usual ordering properties of the alloca's slices
628
628
// / hold.
629
629
void insert (ArrayRef<Slice> NewSlices) {
630
- int OldSize = Slices.size ();
631
630
Slices.append (NewSlices.begin (), NewSlices.end ());
632
- auto SliceI = Slices.begin () + OldSize;
633
- llvm::sort (SliceI, Slices.end ());
634
- std::inplace_merge (Slices.begin (), SliceI, Slices.end ());
631
+ llvm::stable_sort (Slices);
635
632
}
636
633
637
634
// Forward declare the iterator and range accessor for walking the
@@ -5122,7 +5119,7 @@ bool SROA::splitAlloca(AllocaInst &AI, AllocaSlices &AS) {
5122
5119
}
5123
5120
5124
5121
if (!IsSorted)
5125
- llvm::sort (AS);
5122
+ llvm::stable_sort (AS);
5126
5123
5127
5124
// / Describes the allocas introduced by rewritePartition in order to migrate
5128
5125
// / the debug info.
You can’t perform that action at this time.
0 commit comments