[PATCH] D79959: [SampleFDO] Add use-sample-profile function attribute

Wei Mi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 17 21:48:45 PDT 2020


wmi added a comment.

In D79959#2040039 <https://reviews.llvm.org/D79959#2040039>, @davidxl wrote:

> If this is for experimental use, why not just introducing a LLVM internal option that specify a list of function to be skipped? It should be applied to inline instances of the function specified?


One of the use case is to add -fno-profile-sample-use for some library so the library won't use profile information for any build target. If we support it using LLVM internal option then we need to enable the internal option globally. Everytime someone wants to add a function into the list, the global internal option has to be changed. That is not very convenient.

And similar as attribute support, for the function in the to-be-skipped list, it cannot be inlined into function which is not in the list, otherwise its inline instance may still be annotated with profile. function not in the list also cannot be inlined into function in the list. So the implementation won't be much simpler than attribute support.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D79959





More information about the llvm-commits mailing list