[clang] [compiler-rt] [llvm] [InstrFDO][TypeProf] Implement binary instrumentation and profile read/write (PR #66825)

Snehasish Kumar via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 26 14:43:13 PDT 2024


https://github.com/snehasish commented:

Responses to a couple of other comments -
 
> * For LLVM IR test coverage, store textual profiles in the repo, and run `llvm-profdata merge` to convert it to indexed profiles.
> * To have test coverage on raw profiles (generate raw profiles or convert it into other formats), have a compiler-rt test.
> 
> I wonder if that is preferred over the current status (with script and `.profraw` in the repo).

I think we should resort to scripts and profraw in LLVM if we don't have support for textual format. This is the case for memprof for example. If we support vtablenames in the text format, I would prefer the additional `llvm-profdata merge` based testing. 

> Considering a) and c), if 'InstrProfSymtab' has 'allocator' as a member, it needs to implement move assignment operator. 

I think this is the way to go if you choose to adopt the IntervalMap suggestion. It seems cleanest if the allocator and the map are owned by the InstrProfSymtab class.


https://github.com/llvm/llvm-project/pull/66825


More information about the cfe-commits mailing list