[PATCH] D52845: Update entry count for cold calls
David Callahan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 14 17:50:32 PST 2019
david2050 marked 3 inline comments as done.
david2050 added inline comments.
================
Comment at: lib/Transforms/Utils/InlineFunction.cpp:1486-1494
+ for (Instruction &I : BB)
+ if (CallInst *CI = dyn_cast<CallInst>(&I))
+ CI->updateProfWeight(newEntryCount, priorEntryCount);
+ } else {
+ // Otherwise ...
+ for (BasicBlock &BB : *Callee)
+ for (Instruction &I : BB)
----------------
wmi wrote:
> Maybe use a lambda here to remove the code duplication?
I refactored to pull the common out of the iff and trust unswitching :-)
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D52845/new/
https://reviews.llvm.org/D52845
More information about the llvm-commits
mailing list