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

Mingming Liu via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 5 22:09:30 PST 2024


https://github.com/minglotus-6 commented:

> Here are some things I noticed, haven't looked at the tests yet.

@snehasish Thanks for the review! 

Talking about tests, I wonder if it looks better if I change the current LLVM IR test under `llvm/test/tools/llvm-profdata/` into a compiler-rt test under `compiler-rt/test/profile/Linux`, demonstrated in https://github.com/llvm/llvm-project/commit/167d5ce49e41ca098085cda315687ade194981b1

A compiler-rt test requires less files (e.g., no need to submit `.profraw` or its re-generation shell script in the llvm repo) and more self-contained, but it's put under `profile/Linux` so people using non-Linux environments won't run it (less coverage compared with LLVM IR test in this sense). However the support is limited to ELF. 
* The compiler-rt test should work for Darwins (apple). But since this test involves matching mangled names, the matchers could be exact (no regex matching) if test could assume it runs only on ELF.

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


More information about the cfe-commits mailing list