diff options
author | Mircea Trofin <mtrofin@google.com> | 2025-09-10 15:34:35 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-09-10 15:34:35 -0700 |
commit | f2d827c444d07b722a94689b427d6ad2d1c6b1b7 (patch) | |
tree | 0889e7d5698d24a9f00b81a4d02a1e49357b45b8 /clang/lib/Frontend/CompilerInstance.cpp | |
parent | 613caa909c78f707e88960723c6a98364656a926 (diff) | |
download | llvm-f2d827c444d07b722a94689b427d6ad2d1c6b1b7.zip llvm-f2d827c444d07b722a94689b427d6ad2d1c6b1b7.tar.gz llvm-f2d827c444d07b722a94689b427d6ad2d1c6b1b7.tar.bz2 |
[profcheck] Require `unknown` metadata have an origin parameter (#157594)
Rather than passes using `!prof = !{!”unknown”}`for cases where don’t have enough information to emit profile values, this patch captures the pass (or some other information) that can help diagnostics - i.e. `!{!”unknown”, !”some-pass-name”}`.
For example, suppose we emitted a `select` with the unknown metadata, and, later, end up needing to lower that to a conditional branch. If we observe (via sample profiling, for example) that the branch is biased and would have benefitted from a valid profile, the extra information can help speed up debugging.
We can also (in a subsequent pass) generate optimization remarks about such lowered selects, with a similar aim - identify patterns lowering to `select` that may be worth some extra investment in extracting a more precise profile.
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
0 files changed, 0 insertions, 0 deletions