[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:16:51 PDT 2020


wmi added a comment.

In D79959#2040033 <https://reviews.llvm.org/D79959#2040033>, @wenlei wrote:

> If we make it a function attribute, do we need to reject pre-LTO (CGSCC)  inlining between function with different attribute value? If we always expect this attribute to be consistent among functions from the same module, this won't be a problem. However having it as a function attribute does offer function level flexibility (e.g. if this is exposed through `__attribute(..)__`), and we may want to account for it..


Good point. Although function level flexibility is not needed so far, people may create IR with different attribute values. It is better to block the inlining between function with different attribute values to keep it consistent.  I will do it this way.


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