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 fae3493 commit ad8d549Copy full SHA for ad8d549
llvm/lib/Transforms/IPO/SampleProfile.cpp
@@ -629,7 +629,8 @@ inline void SampleProfileInference<Function>::findUnlikelyJumps(
629
const Instruction *TI = BB->getTerminator();
630
// Check if a block ends with InvokeInst and mark non-taken branch unlikely.
631
// In that case block Succ should be a landing pad
632
- if (Successors[BB].size() == 2 && Successors[BB].back() == Succ) {
+ const auto &Succs = Successors[BB];
633
+ if (Succs.size() == 2 && Succs.back() == Succ) {
634
if (isa<InvokeInst>(TI)) {
635
Jump.IsUnlikely = true;
636
}
0 commit comments