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 0e346ee commit 575e68eCopy full SHA for 575e68e
llvm/lib/Transforms/IPO/FunctionSpecialization.cpp
@@ -689,7 +689,9 @@ bool FunctionSpecializer::run() {
689
// specialization budget, which is derived from maximum number of
690
// specializations per specialization candidate function.
691
auto CompareScore = [&AllSpecs](unsigned I, unsigned J) {
692
- return AllSpecs[I].Score > AllSpecs[J].Score;
+ if (AllSpecs[I].Score != AllSpecs[J].Score)
693
+ return AllSpecs[I].Score > AllSpecs[J].Score;
694
+ return I > J;
695
};
696
const unsigned NSpecs =
697
std::min(NumCandidates * MaxClones, unsigned(AllSpecs.size()));
0 commit comments