aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/SourceMgr.cpp
diff options
context:
space:
mode:
authorMingming Liu <mingmingl@google.com>2025-10-13 10:29:23 -0700
committerGitHub <noreply@github.com>2025-10-13 10:29:23 -0700
commita6fdbcbb2ccca07af2154509801fc6b6d27542a3 (patch)
tree525c37167ec751f63078dd991f8386484c051e90 /llvm/lib/Support/SourceMgr.cpp
parent55d4e92c8821d5543469118a76fe38db866377b7 (diff)
downloadllvm-a6fdbcbb2ccca07af2154509801fc6b6d27542a3.zip
llvm-a6fdbcbb2ccca07af2154509801fc6b6d27542a3.tar.gz
llvm-a6fdbcbb2ccca07af2154509801fc6b6d27542a3.tar.bz2
[StaticDataLayout][MemProf] Record whether the IR is compiled with data access profiles by module flag. (#162333)
The codegen pass in the pipeline can read the module flag to tell whether the IR is compiled with data access profile, to support two use cases when `memprof-annotate-static-data-prefix=true` is enabled 1. The binary is compiled with data access profiles. - The module flag will have value 1, and codegen pass should regard an empty section prefix as 'unknown' and conservatively not placing the data into `.unlikely` data sections. 2. The binary is compiled without data access profiles (e.g., during incremental rollout, etc) - The module flag will have value 0, and codegen pass can override an empty section prefix based on PGO counters. https://github.com/llvm/llvm-project/pull/155337 shows the motivating use case in function `StaticDataProfileInfo::getConstantSectionPrefix` in `llvm/lib/Analysis/StaticDataProfileInfo.cpp` This is the 1st patch as a split of https://github.com/llvm/llvm-project/pull/155337
Diffstat (limited to 'llvm/lib/Support/SourceMgr.cpp')
0 files changed, 0 insertions, 0 deletions