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 1c55586 commit ce8c43fCopy full SHA for ce8c43f
llvm/lib/Transforms/IPO/SampleProfile.cpp
@@ -439,7 +439,10 @@ struct CandidateComparer {
439
440
const FunctionSamples *LCS = LHS.CalleeSamples;
441
const FunctionSamples *RCS = RHS.CalleeSamples;
442
- assert(LCS && RCS && "Expect non-null FunctionSamples");
+ // In inline replay mode, CalleeSamples may be null and the order doesn't
443
+ // matter.
444
+ if (!LCS || !RCS)
445
+ return LCS;
446
447
// Tie breaker using number of samples try to favor smaller functions first
448
if (LCS->getBodySamples().size() != RCS->getBodySamples().size())
0 commit comments