[PATCH] D108350: [CSSPGO] Use probe inline tree to track zero size fully optimized context for pre-inliner

Wenlei He via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 18 21:15:55 PDT 2021


wenlei created this revision.
wenlei added reviewers: hoy, wmi, wlei, davidxl.
Herald added subscribers: ormris, modimo, lxfind, hiraditya.
wenlei requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This is a follow up diff for BinarySizeContextTracker to track zero size for fully optimized inlinee. When an inlinee is fully optimized away, we won't be able to get its size through symbolizing instructions, hence we will treat the corresponding context size as unknown. However by traversing the inlined probe forest, we know what're original inlinees regardless of optimization. If a context show up in inlined probes, but not during symbolization, we know that it's fully optimized away hence its size is zero instead of unknown. It should provide more accurate size cost estimation for pre-inliner to make better inline decisions in llvm-profgen.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D108350

Files:
  llvm/include/llvm/MC/MCPseudoProbe.h
  llvm/include/llvm/Transforms/IPO/SampleContextTracker.h
  llvm/lib/Transforms/IPO/SampleContextTracker.cpp
  llvm/test/tools/llvm-profgen/cs-preinline-cost.test
  llvm/tools/llvm-profgen/ProfiledBinary.cpp
  llvm/tools/llvm-profgen/ProfiledBinary.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108350.367395.patch
Type: text/x-patch
Size: 8736 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210819/e522e7c5/attachment.bin>


More information about the llvm-commits mailing list