[PATCH] D99238: [DebugInfo] Enable the call site parameter feature by default

Alok Kumar Sharma via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 1 03:53:08 PDT 2021


alok updated this revision to Diff 334642.
alok added a comment.

Updated to address comments from @djtodoro


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

https://reviews.llvm.org/D99238

Files:
  clang/include/clang/Basic/CodeGenOptions.def
  clang/lib/Frontend/CompilerInvocation.cpp
  llvm/include/llvm/Target/TargetOptions.h


Index: llvm/include/llvm/Target/TargetOptions.h
===================================================================
--- llvm/include/llvm/Target/TargetOptions.h
+++ llvm/include/llvm/Target/TargetOptions.h
@@ -303,8 +303,8 @@
     std::shared_ptr<MemoryBuffer> BBSectionsFuncListBuf;
 
     /// The flag enables call site info production. It is used only for debug
-    /// info, and it is restricted only to optimized code. This can be used for
-    /// something else, so that should be controlled in the frontend.
+    /// info. This can be used for something else, so that should be controlled
+    /// in the frontend.
     unsigned EmitCallSiteInfo : 1;
     /// Set if the target supports the debug entry values by default.
     unsigned SupportsDebugEntryValues : 1;
Index: clang/lib/Frontend/CompilerInvocation.cpp
===================================================================
--- clang/lib/Frontend/CompilerInvocation.cpp
+++ clang/lib/Frontend/CompilerInvocation.cpp
@@ -1645,7 +1645,7 @@
       llvm::Triple::arm, llvm::Triple::armeb, llvm::Triple::mips,
       llvm::Triple::mipsel, llvm::Triple::mips64, llvm::Triple::mips64el};
 
-  if (Opts.OptimizationLevel > 0 && Opts.hasReducedDebugInfo() &&
+  if (Opts.hasReducedDebugInfo() &&
       llvm::is_contained(DebugEntryValueArchs, T.getArch()))
     Opts.EmitCallSiteInfo = true;
 
Index: clang/include/clang/Basic/CodeGenOptions.def
===================================================================
--- clang/include/clang/Basic/CodeGenOptions.def
+++ clang/include/clang/Basic/CodeGenOptions.def
@@ -68,8 +68,7 @@
 CODEGENOPT(DebugPassManager, 1, 0) ///< Prints debug information for the new
                                    ///< pass manager.
 CODEGENOPT(DisableRedZone    , 1, 0) ///< Set when -mno-red-zone is enabled.
-CODEGENOPT(EmitCallSiteInfo, 1, 0) ///< Emit call site info only in the case of
-                                   ///< '-g' + 'O>0' level.
+CODEGENOPT(EmitCallSiteInfo, 1, 0) ///< Emit call site info.
 CODEGENOPT(EnableDIPreservationVerify, 1, 0) ///< Enable di preservation verify
                                              ///< each (it means check
                                              ///< the original debug info


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99238.334642.patch
Type: text/x-patch
Size: 2233 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210401/d5b7345e/attachment.bin>


More information about the cfe-commits mailing list