[PATCH] D70653: [AutoFDO] Properly merge context-sensitive profile of inlinee back to outlined function
Wei Mi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 5 09:14:25 PST 2019
wmi accepted this revision.
wmi added a comment.
This revision is now accepted and ready to land.
I rerun perf test and I don't see any performance change. Last run I saw very small improvement on latency in a benchmark. This is fine since the benchmark has some fluctuation by itself.
================
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)
----------------
Nit: have an early return when CalleeName.empty() is true.
================
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
----------------
run opt -instnamer for the test.
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