[llvm] [CodeGen] Add EmitCodeGenCallSiteInfo flag (PR #206668)

Zhaoxuan Jiang via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 10 00:06:31 PDT 2026


nocchijiang wrote:

Thanks for digging in, and for running the compile-time numbers.

The callsite info isn't purely internal. `EmitCallSiteInfo` was introduced for debug info, and its consumer is the DWARF emitter, so it's emitted into the artifact under `-g`. For the outliner's use, recording `HasStackArguments` emits nothing; it's read during codegen.

That entanglement with debug-info emission is what originally made me reach for a distinct switch rather than overloading `EmitCallSiteInfo`, to keep the side effect of recording `HasStackArguments` scoped. But given your compile-time result, I don't think the worry is strong enough to insist on it. The max-rss bump makes sense: callsite info is heap-allocated per call, so it scales with the call count.

So if that max-rss increase is acceptable to you, I'm happy to close this PR and rework the `HasStackArguments` PR so that it automatically enables `EmitCallSiteInfo` for AArch64 backends when the machine outliner is enabled. Another option is to maintain a completely separate `HasStackArguments` side table, which would sidestep `EmitCallSiteInfo` entirely. That said, `CallSiteInfo` already fits the purpose well - it's the existing per-call side table - so standing up a parallel structure feels like a waste to me.

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


More information about the llvm-commits mailing list