diff options
author | Mingming Liu <mingmingl@google.com> | 2025-10-14 21:15:31 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-10-14 21:15:31 -0700 |
commit | c63002eb9a7eafd2eab4f25b17d38f5fe73ae6b5 (patch) | |
tree | 0e181a22a9f0b2d9bcd4ebf20119031796ad9adc /llvm/lib/Support/PrettyStackTrace.cpp | |
parent | 9a46060aedc6bde26e939999de36442a23c07783 (diff) | |
download | llvm-c63002eb9a7eafd2eab4f25b17d38f5fe73ae6b5.zip llvm-c63002eb9a7eafd2eab4f25b17d38f5fe73ae6b5.tar.gz llvm-c63002eb9a7eafd2eab4f25b17d38f5fe73ae6b5.tar.bz2 |
[NFC][StaticDataProfileInfo] Refactor StaticDataProfileInfo::getConstantSectionPrefix and extract analysis based on PGO-counter to be a helper function (#162388)
`StaticDataProfileInfo::getConstantSectionPrefix` is used twice in
codegen ([1] and [2]) to emit section prefix for constants.
Before this patch, its implementation does analysis using PGO-counters,
and PGO-counters are only available on module-internal constants.
After this patch, the PGO-counter analysis are extracted to a helper
function, and returns enum rather than StringPrefix. This way, the
follow up patch https://github.com/llvm/llvm-project/pull/163325 can
extend this function to use global variable section prefix and compute a
max (the hotter one).
[1]
https://github.com/llvm/llvm-project/blob/975fba1b499422713e88cd6f374569f3bd38335e/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp#L3014-L3019
[2]
https://github.com/llvm/llvm-project/blob/975fba1b499422713e88cd6f374569f3bd38335e/llvm/lib/CodeGen/StaticDataAnnotator.cpp#L77-L84
Diffstat (limited to 'llvm/lib/Support/PrettyStackTrace.cpp')
0 files changed, 0 insertions, 0 deletions