mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 19:12:56 +02:00
Fix UB found by -Wtautological-undefined-compare
llvm-svn: 298279
This commit is contained in:
parent
f0b9e63af6
commit
c335618c9c
@ -1439,10 +1439,9 @@ static void updateCallProfile(Function *Callee, const ValueToValueMapTy &VMap,
|
||||
CalleeEntryCount.getValue());
|
||||
|
||||
for (auto const &Entry : VMap)
|
||||
if (isa<CallInst>(Entry.first) && &*Entry.second != nullptr &&
|
||||
isa<CallInst>(Entry.second))
|
||||
cast<CallInst>(Entry.second)
|
||||
->updateProfWeight(CallCount, CalleeEntryCount.getValue());
|
||||
if (isa<CallInst>(Entry.first))
|
||||
if (auto *CI = dyn_cast_or_null<CallInst>(Entry.second))
|
||||
CI->updateProfWeight(CallCount, CalleeEntryCount.getValue());
|
||||
for (BasicBlock &BB : *Callee)
|
||||
// No need to update the callsite if it is pruned during inlining.
|
||||
if (VMap.count(&BB))
|
||||
|
Loading…
Reference in New Issue
Block a user