We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 139e0aa commit 7af38ffCopy full SHA for 7af38ff
llvm/lib/Transforms/Scalar/SROA.cpp
@@ -630,7 +630,7 @@ class AllocaSlices {
630
int OldSize = Slices.size();
631
Slices.append(NewSlices.begin(), NewSlices.end());
632
auto SliceI = Slices.begin() + OldSize;
633
- llvm::sort(SliceI, Slices.end());
+ std::stable_sort(SliceI, Slices.end());
634
std::inplace_merge(Slices.begin(), SliceI, Slices.end());
635
}
636
@@ -5122,7 +5122,7 @@ bool SROA::splitAlloca(AllocaInst &AI, AllocaSlices &AS) {
5122
5123
5124
if (!IsSorted)
5125
- llvm::sort(AS);
+ llvm::stable_sort(AS);
5126
5127
/// Describes the allocas introduced by rewritePartition in order to migrate
5128
/// the debug info.
0 commit comments