[llvm] [StaticDataLayout][MemProf] Record whether the IR is compiled with data access profiles by module flag. (PR #162333)

Mingming Liu via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 10 16:15:27 PDT 2025


mingmingl-llvm wrote:

> I don't think you want to do that, because a module without any globals would get a flag value of 0, and per Module::Warning semantics, if it is combined with another module via an LTO link the first value would win. I think you want this to emit the same value, or none, for all modules using the same profile.

yeah this makes sense. 

Actually the module flag semantic is chosen to be warning to accommodate for the un-common case when one translation unit doesn't have this module flag (e.g., use per translation unit build flags to work around build issues); we don't want the whole build to fail due to different module flag values.

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


More information about the llvm-commits mailing list