[compiler-rt] [Profile] Add binary profile correlation to offload profile metadata at runtime. (PR #69493)

via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 20 05:02:12 PDT 2023


zmodem wrote:

> > > I think there should be a proper Clang flag to control this, instead of requiring users to pass internal `-mllvm` flags. (Also the flag should be well documented.)
> > 
> > 
> > I believe Zequan did that at one point, but he ran into the problem that Rust and Clang need to agree on the coverage metadata section flags. Using an mllvm flag means we can opt into the new mode for both clang and rust simultaneously, hopefully without waiting for rustc changes.
> 
> Since I modified clang CoverageMappingGen.cpp to conditionally add toggle this new mode in __llvm_profile_raw_version variable, rustc needs to do similar change at frontend in order to use this with code coverage.

Interesting. Yes, this does seem like a good motivation for using internal flags, but I think the long-term aim should still be that we get proper user-facing flags in both clang and rustc.

> I'm not sure if we can pass -mllvm flag to rustc.

I think the equivalent of `-mllvm x` is `-C llvm-args=x` for rustc.

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


More information about the llvm-commits mailing list