[PATCH] D76802: [InstrProfiling] Use !associated metadata for counters, data and values

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 6 14:37:25 PDT 2020


pcc added a comment.

In D76802#2201164 <https://reviews.llvm.org/D76802#2201164>, @phosek wrote:

> In D76802#2200926 <https://reviews.llvm.org/D76802#2200926>, @pcc wrote:
>
>> In D76802#2200906 <https://reviews.llvm.org/D76802#2200906>, @phosek wrote:
>>
>>> @davidxl does this look good to you? This feature is now gated on `-counter-associated-metadata` flag (I'd welcome suggestions for better name if you have some) because we require recent lld. We might be able to set that flag in the frontend when we know that the latest lld is being used in the future.
>>
>> Can you find a better way of communicating this infomation than via an `llvm::cl` flag (e.g. use a function attribute)? The flag won't be compatible with LTO.
>
> Do I understand your suggestion correctly that we would set function attribute when `-fprofile-*-generate -fuse-lld` is used that would enable the use of metadata in the backend?

Yes, that's what I had in mind.


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

https://reviews.llvm.org/D76802



More information about the llvm-commits mailing list