[PATCH] D104060: Machine IR Profile

Ellis Hoag via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 18 10:50:27 PDT 2021


ellis marked an inline comment as done.
ellis added a comment.

@davidxl

> davidxl: For the dynamic dispatching profiling, does it handle any number of indirect targets or only supports topN?

Our edge profiling patch (not included) was also designed with code size and runtime in mind. We allocate a buffer and sample return addresses, possibly overwriting old values when the buffer is full.  Data for common callsites will overwrite data for rare callsites, so I guess it's more like top N, but the size of the buffer can be as large as needed.

> davidxl: Basically the callsite context (counter) is passed to the caller so it can do the profiling. GCC does that too.

Our method does not need to touch the callsite code to work. In fact, most of the implementation is done in D104089 <https://reviews.llvm.org/D104089> so we mostly only change the runtime code.

> davidxl: For IRPGO, we plan to add dynamic type profiling at some point. Once that is ready, the problem of message passing style call profiling will be handled.
> davidxl: Also if edge profiling is available, profiling direct calls will be a waste as the information can be deduced.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104060/new/

https://reviews.llvm.org/D104060



More information about the llvm-commits mailing list