[PATCH] D95988: [CSSPGO] Process functions in a top-down order on a dynamic call graph.

Hongtao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 3 17:00:39 PST 2021


hoy created this revision.
Herald added subscribers: wenlei, mgrang, hiraditya.
hoy requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Functions are currently processed by the sample profiler loader in a top-down order defined by the static call graph. The order is being adjusted to be a top-down order based on the input context-sensitive profile. One benefit is that the processing order of caller and callee in one SCC would follow the context order in the profile to favor more inlining. Another benefit is that the processing order of caller and callee through an indirect call (which is not on the static call graph) can be honored which in turn allows for more inlining.

Two switches `-mllvm -use-profile-indirect-call-edges` and `-mllvm -use-profile-top-down-order` are being introduced. Both are on by default.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D95988

Files:
  llvm/include/llvm/Transforms/IPO/SampleContextTracker.h
  llvm/lib/Transforms/IPO/SampleContextTracker.cpp
  llvm/lib/Transforms/IPO/SampleProfile.cpp
  llvm/test/Transforms/SampleProfile/Inputs/profile-context-order.prof
  llvm/test/Transforms/SampleProfile/profile-context-order.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95988.321265.patch
Type: text/x-patch
Size: 22148 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210204/1b5b13c4/attachment.bin>


More information about the llvm-commits mailing list