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

Vitaly Buka via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 26 16:40:58 PDT 2024


vitalybuka wrote:


> 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?

-fno-sanitize= IR changes:
1. #ifdef branches on sanitizer
2. function attributes
3. some pre-profile optimization suppressed with sanitizer

maybe other reasons, but as is profile does not match if collected with -fno-sanitize=hwsan

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


More information about the cfe-commits mailing list