[PATCH] D116821: [DebugInfo][InstrRef] Move instr-ref controlling flag out of TargetOptions

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 1 14:20:01 PST 2022


rnk added a comment.

In D116821#3288655 <https://reviews.llvm.org/D116821#3288655>, @probinson wrote:

> The argument (made by licensees; we didn't make this up out of thin air) is that in-class defined methods, and those explicitly marked as `inline` or `always_inline` in the source, do tend to be small and not the source of real bugs.  Also, making it obvious from the source whether a given function would be affected was a positive point.  Yes, a team could spend a lot of effort adding `nodebug` everywhere, but having the quick and easy ability to _get_ debug info for everything (by fiddling a command-line option, no tedious source modifications required) was also a win.

I've heard about this behavior in the Sony compiler, but for some reason I never thought about it as a flag. A flag to get this behavior seems like something we could reasonably accept upstream, for all the reasons you describe. It's a reasonable heuristic for some codebases. However, in my experience, there are plenty of complex methods defined inline in class templates, and the existing behavior of retaining all the inlined call site info seems like a better default.

You may recall this came up in the -gno-inline-line-tables patch https://reviews.llvm.org/D67723, which was really driven by debug info size concerns rather than debug experience concerns.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116821/new/

https://reviews.llvm.org/D116821



More information about the llvm-commits mailing list