[clang] [hwasan] Don't instrument when PGO profile is collected (PR #86739)

Arthur Eubanks via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 26 16:10:25 PDT 2024


aeubanks wrote:

> We already have similar stuff:
> 
> ```
> if (PGOOpt && Phase != ThinOrFullLTOPhase::ThinLTOPostLink &&
>       !PGOOpt->MemoryProfile.empty())
>     MPM.addPass(MemProfUsePass(PGOOpt->MemoryProfile, PGOOpt->FS));
> ```

checking for ThinLTO pre/post link is a correctness thing though

I think I'm still confused on exactly what the use case is and why we can't just ask the user to not specify hwasan in the PGO instrumented build. Just for user convenience? Or does clang change the emitted IR when hwasan is enabled? And that's what will lead to mismatched profiles?

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


More information about the cfe-commits mailing list