Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion llvm/lib/CodeGen/AtomicExpandPass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1301,7 +1301,7 @@ Value *AtomicExpandImpl::insertRMWLLSCLoop(
// Atomic RMW expands to a Load-linked / Store-Conditional loop, because it is
// hard to predict precise branch weigths we mark the branch as "unknown"
// (50/50) to prevent misleading optimizations.
setExplicitlyUnknownBranchWeightsIfProfiled(*CondBr, *F, DEBUG_TYPE);
setExplicitlyUnknownBranchWeightsIfProfiled(*CondBr, DEBUG_TYPE);

Builder.SetInsertPoint(ExitBB, ExitBB->begin());
return Loaded;
Expand Down
6 changes: 2 additions & 4 deletions llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,7 @@ static void buildPartialInvariantUnswitchConditionalBranch(
IRB.CreateCondBr(Cond, Direction ? &UnswitchedSucc : &NormalSucc,
Direction ? &NormalSucc : &UnswitchedSucc, ProfData);
if (!ProfData)
setExplicitlyUnknownBranchWeightsIfProfiled(*BR, *BR->getFunction(),
DEBUG_TYPE);
setExplicitlyUnknownBranchWeightsIfProfiled(*BR, DEBUG_TYPE);
}

/// Rewrite the PHI nodes in an unswitched loop exit basic block.
Expand Down Expand Up @@ -3203,8 +3202,7 @@ injectPendingInvariantConditions(NonTrivialUnswitchCandidate Candidate, Loop &L,
auto *InvariantBr =
Builder.CreateCondBr(InjectedCond, InLoopSucc, CheckBlock);
// We don't know anything about the relation between the limits.
setExplicitlyUnknownBranchWeightsIfProfiled(
*InvariantBr, *InvariantBr->getParent()->getParent(), DEBUG_TYPE);
setExplicitlyUnknownBranchWeightsIfProfiled(*InvariantBr, DEBUG_TYPE);

Builder.SetInsertPoint(CheckBlock);
Builder.CreateCondBr(
Expand Down
Loading