[PATCH] D49887: [DebugInfo] Add support for DWARF5 call site-related attributes

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 13 09:25:50 PDT 2018


aprantl added inline comments.


================
Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:51-55
+static llvm::cl::opt<bool> CallSiteDebugInfo(
+    "callsite-debuginfo-experimental", llvm::cl::Hidden,
+    llvm::cl::desc("Emit call site-related debug information (experimental)"),
+    llvm::cl::init(false));
+
----------------
vsk wrote:
> dblaikie wrote:
> > Notice there aren't many cl::opts in clang - this should instead probably be added as a cc1 option, probably a '-f' option (see if GCC has a flag name for this already you can reuse?). Once it's more than experimental, promoted up to a full driver option that forwards down to a cc1 option, etc.
> I think it'd make sense to add a -cc1/driver option if we wanted users to be able to toggle this functionality on/off. But, I don't think we do.
> 
> FWIW, GCC just turns call site info on by default (see https://godbolt.org/g/BrLCTd, note that they use .uleb128 0x2117 for DW_AT_GNU_all_call_sites but it's the same thing). From what I can make of GCC's '-###' output, they have no frontend toggle. I think the view here (which I share) is that call site info is just part of generic debugging support.
> 
> It seems prudent/sufficient to gate the llvm support on a temporary cl::opt. We'd remove the cl::opt in short order when https://reviews.llvm.org/D50478 lands.
> 
> Wdyt? Is there some use case for having a driver-level I'm just missing?
Why would someone want to turn this feature off? Does it increase the size by a lot?


https://reviews.llvm.org/D49887





More information about the llvm-commits mailing list