Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion llvm/lib/Transforms/IPO/SampleProfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,8 @@ inline void SampleProfileInference<Function>::findUnlikelyJumps(
const Instruction *TI = BB->getTerminator();
// Check if a block ends with InvokeInst and mark non-taken branch unlikely.
// In that case block Succ should be a landing pad
if (Successors[BB].size() == 2 && Successors[BB].back() == Succ) {
const auto &Succs = Successors[BB];
if (Succs.size() == 2 && Succs.back() == Succ) {
if (isa<InvokeInst>(TI)) {
Jump.IsUnlikely = true;
}
Expand Down