[PATCH] D70653: [AutoFDO] Properly merge context-sensitive profile of inlinee back to outlined function
Wenlei He via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 5 10:52:39 PST 2019
wenlei added inline comments.
================
Comment at: llvm/include/llvm/ProfileData/SampleProf.h:394
const FunctionSamples *R = nullptr;
- for (const auto &NameFS : iter->second)
- if (NameFS.second.getTotalSamples() >= MaxTotalSamples) {
- MaxTotalSamples = NameFS.second.getTotalSamples();
- R = &NameFS.second;
- }
+ if (CalleeName.empty()) {
+ for (const auto &NameFS : iter->second)
----------------
wmi wrote:
> Nit: have an early return when CalleeName.empty() is true.
done
================
Comment at: llvm/test/Transforms/SampleProfile/inline-mergeprof.ll:33-34
+ store i32 %y, i32* %y.addr, align 4
+ %0 = load i32, i32* %x.addr, align 4, !dbg !11
+ %1 = load i32, i32* %y.addr, align 4, !dbg !11
+ %add = add nsw i32 %0, %1, !dbg !11
----------------
wmi wrote:
> run opt -instnamer for the test.
done. i need to develop this habit. :)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70653/new/
https://reviews.llvm.org/D70653
More information about the llvm-commits
mailing list