[clang] [llvm] [compiler-rt] [Profile] Refactor profile correlation. (PR #70856)

Zequan Wu via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 2 11:43:54 PDT 2023


ZequanWu wrote:

> > Sounds fine to me, but I guess I don't understand why `-profile-correlate=` doesn't work. Do you still plan to add the flag later?
> 
> I haven't found a way to share information (whether of not binary correlation is enabled) between CodeGen(TargetLoweringObjectFileImpl.cpp) and Instrumentation(InstrProfiling.cpp) components. The explanation is here: https://discourse.llvm.org/t/rfc-add-binary-profile-correlation-to-not-load-profile-metadata-sections-into-memory-at-runtime/74565#use-temporary-section-names-6.

Oh, actually, we can have -profile-correlate flag just need to define it at InstrProfCorrelator.cpp (ProfileData component), which is less desired but working as discussed at https://github.com/llvm/llvm-project/pull/69656#discussion_r1372179620. 

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


More information about the cfe-commits mailing list