[llvm] [CodeGen] Add EmitCodeGenCallSiteInfo flag (PR #206668)
Zhaoxuan Jiang via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 17 20:50:18 PDT 2026
================
@@ -886,6 +886,7 @@ EmitSchedule(MachineBasicBlock::iterator &InsertPos) {
if (MI->isCandidateForAdditionalCallInfo()) {
if (DAG->getTarget().Options.EmitCallSiteInfo ||
+ DAG->getTarget().Options.EmitCodeGenCallSiteInfo ||
----------------
nocchijiang wrote:
Two differences.
- **Reachability**. `EmitCallSiteInfo` is only populated by `InitTargetOptionsFromCodeGenFlags()`, which only llc/opt instantiate. Frontends built on LLVM - Clang, LTO, Rust, Swift - have no way to pass this flag through; each would need a source change to set the bit. Avoiding exactly that is the point of this PR: the new flag is a plain global `cl::opt`, so any frontend opts in via its normal llvm-args passthrough with no source change.
- **Scope**. Per @kyulee-com, `EmitCallSiteInfo` stays as-is - it was meant for debug info. The new gate is codegen-scoped, OR'd in only at the side-table attach/handle points, mirroring how `EmitCallGraphSection` is already wired in. It's the seed for an extra `CallSiteInfo` field that helps Machine Outliner find more opportunities - codegen, not debug info, hence `Emit**CodeGen**CallSiteInfo`.
https://github.com/llvm/llvm-project/pull/206668
More information about the llvm-commits
mailing list