[PATCH] D85628: [HotColdSplitting] Add command line options for supplying cold function names via user input.

Aditya Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 12 15:29:00 PDT 2020


hiraditya added a comment.

> It doesn’t make sense to me to make alternations to standard library functions within the compiler. It seems better to simply patch the standard library.

The standard library function is an example. There could be cases where the same function is hot in one instance but cold in another. Annotating function declarations hot/cold could introduce regressions in that case.

> This adds another way to do it, but it's kind of a side-injection and it doesn't seem particularly principled. Presumably the list you're feeding through the command-line comes from a profile? Why isn't it provided as profile information?

For example: https://godbolt.org/z/ThaGEW the constructor of static object is always cold, how can we outline this if say we don't have a profile information. A workload can have a set of cold functions which programmer would know, but they necessarily don't have profile information. If there's a better way to make compiler aware of this, I'll be more than happy to work on that.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85628



More information about the llvm-commits mailing list