<div dir="ltr">Also, this patch was reverted and recommitted several times (more than I think would be ideal) - please include more details in the commit message about what went wrong, what was fixed, what testing was missed in the first place and done in subsequent precommit validation (& is there anything more broadly we could learn from this patches story to avoid this kind of revert/recommit repetition in the future?)</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Mar 21, 2020 at 8:13 PM David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Please include the "Differential Revision" line so that Phab picks up commits like this and ties them into the review (& also makes it conveniently clickable to jump from the commit mail to the review)</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 19, 2020 at 5:58 AM Djordje Todorovic via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Author: Djordje Todorovic<br>
Date: 2020-03-19T13:57:30+01:00<br>
New Revision: d9b962100942c71a4c26debaa716f7ab0c4ea8a1<br>
<br>
URL: <a href="https://github.com/llvm/llvm-project/commit/d9b962100942c71a4c26debaa716f7ab0c4ea8a1" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/d9b962100942c71a4c26debaa716f7ab0c4ea8a1</a><br>
DIFF: <a href="https://github.com/llvm/llvm-project/commit/d9b962100942c71a4c26debaa716f7ab0c4ea8a1.diff" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/d9b962100942c71a4c26debaa716f7ab0c4ea8a1.diff</a><br>
<br>
LOG: Reland D73534: [DebugInfo] Enable the debug entry values feature by default<br>
<br>
The issue that was causing the build failures was fixed with the D76164.<br>
<br>
Added: <br>
    llvm/test/DebugInfo/X86/no-entry-values-with-O0.ll<br>
<br>
Modified: <br>
    clang/include/clang/Basic/CodeGenOptions.def<br>
    clang/include/clang/Driver/CC1Options.td<br>
    clang/lib/CodeGen/BackendUtil.cpp<br>
    clang/lib/CodeGen/CGDebugInfo.cpp<br>
    clang/lib/Frontend/CompilerInvocation.cpp<br>
    clang/test/CodeGen/debug-info-extern-call.c<br>
    clang/test/CodeGenCXX/dbg-info-all-calls-described.cpp<br>
    lldb/packages/Python/lldbsuite/test/decorators.py<br>
    lldb/test/API/functionalities/param_entry_vals/basic_entry_values_x86_64/Makefile<br>
    llvm/include/llvm/Target/TargetMachine.h<br>
    llvm/include/llvm/Target/TargetOptions.h<br>
    llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp<br>
    llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h<br>
    llvm/lib/CodeGen/CommandFlags.cpp<br>
    llvm/lib/CodeGen/LiveDebugValues.cpp<br>
    llvm/lib/CodeGen/TargetOptionsImpl.cpp<br>
    llvm/lib/Target/AArch64/AArch64TargetMachine.cpp<br>
    llvm/lib/Target/ARM/ARMTargetMachine.cpp<br>
    llvm/lib/Target/X86/X86TargetMachine.cpp<br>
    llvm/test/CodeGen/MIR/Hexagon/bundled-call-site-info.mir<br>
    llvm/test/CodeGen/MIR/X86/call-site-info-error4.mir<br>
    llvm/test/CodeGen/X86/call-site-info-output.ll<br>
    llvm/test/DebugInfo/AArch64/dbgcall-site-float-entry-value.ll<br>
    llvm/test/DebugInfo/MIR/AArch64/dbgcall-site-orr-moves.mir<br>
    llvm/test/DebugInfo/MIR/ARM/call-site-info-vmovd.mir<br>
    llvm/test/DebugInfo/MIR/ARM/call-site-info-vmovs.mir<br>
    llvm/test/DebugInfo/MIR/ARM/dbgcall-site-propagated-value.mir<br>
    llvm/test/DebugInfo/MIR/Hexagon/dbgcall-site-instr-before-bundled-call.mir<br>
    llvm/test/DebugInfo/MIR/Hexagon/live-debug-values-bundled-entry-values.mir<br>
    llvm/test/DebugInfo/MIR/SystemZ/call-site-lzer.mir<br>
    llvm/test/DebugInfo/MIR/X86/DW_OP_entry_value.mir<br>
    llvm/test/DebugInfo/MIR/X86/call-site-gnu-vs-dwarf5-attrs.mir<br>
    llvm/test/DebugInfo/MIR/X86/callsite-stack-value.mir<br>
    llvm/test/DebugInfo/MIR/X86/dbgcall-site-copy-super-sub.mir<br>
    llvm/test/DebugInfo/MIR/X86/dbgcall-site-interpretation.mir<br>
    llvm/test/DebugInfo/MIR/X86/dbgcall-site-lea-interpretation.mir<br>
    llvm/test/DebugInfo/MIR/X86/dbgcall-site-partial-describe.mir<br>
    llvm/test/DebugInfo/MIR/X86/dbgcall-site-reference.mir<br>
    llvm/test/DebugInfo/MIR/X86/dbgcall-site-reg-shuffle.mir<br>
    llvm/test/DebugInfo/MIR/X86/dbgcall-site-two-fwd-reg-defs.mir<br>
    llvm/test/DebugInfo/MIR/X86/dbginfo-entryvals.mir<br>
    llvm/test/DebugInfo/MIR/X86/debug-call-site-param.mir<br>
    llvm/test/DebugInfo/MIR/X86/entry-value-of-modified-param.mir<br>
    llvm/test/DebugInfo/MIR/X86/entry-values-diamond-bbs.mir<br>
    llvm/test/DebugInfo/MIR/X86/propagate-entry-value-cross-bbs.mir<br>
    llvm/test/DebugInfo/MIR/X86/unreachable-block-call-site.mir<br>
    llvm/test/DebugInfo/X86/dbg-value-range.ll<br>
    llvm/test/DebugInfo/X86/dbg-value-regmask-clobber.ll<br>
    llvm/test/DebugInfo/X86/dbgcall-site-64-bit-imms.ll<br>
    llvm/test/DebugInfo/X86/dbgcall-site-zero-valued-imms.ll<br>
    llvm/test/DebugInfo/X86/loclists-dwp.ll<br>
    llvm/test/tools/llvm-locstats/locstats.ll<br>
<br>
Removed: <br>
<br>
<br>
<br>
################################################################################<br>
diff  --git a/clang/include/clang/Basic/CodeGenOptions.def b/clang/include/clang/Basic/CodeGenOptions.def<br>
index 3c8b0eeb47a5..e047054447f3 100644<br>
--- a/clang/include/clang/Basic/CodeGenOptions.def<br>
+++ b/clang/include/clang/Basic/CodeGenOptions.def<br>
@@ -63,7 +63,6 @@ CODEGENOPT(ExperimentalNewPassManager, 1, 0) ///< Enables the new, experimental<br>
 CODEGENOPT(DebugPassManager, 1, 0) ///< Prints debug information for the new<br>
                                    ///< pass manager.<br>
 CODEGENOPT(DisableRedZone    , 1, 0) ///< Set when -mno-red-zone is enabled.<br>
-CODEGENOPT(EnableDebugEntryValues, 1, 0) ///< Emit call site parameter dbg info<br>
 CODEGENOPT(EmitCallSiteInfo, 1, 0) ///< Emit call site info only in the case of<br>
                                    ///< '-g' + 'O>0' level.<br>
 CODEGENOPT(IndirectTlsSegRefs, 1, 0) ///< Set when -mno-tls-direct-seg-refs<br>
<br>
diff  --git a/clang/include/clang/Driver/CC1Options.td b/clang/include/clang/Driver/CC1Options.td<br>
index b7a2826d8fcb..cc30893703df 100644<br>
--- a/clang/include/clang/Driver/CC1Options.td<br>
+++ b/clang/include/clang/Driver/CC1Options.td<br>
@@ -388,8 +388,6 @@ def flto_visibility_public_std:<br>
 def flto_unit: Flag<["-"], "flto-unit">,<br>
     HelpText<"Emit IR to support LTO unit features (CFI, whole program vtable opt)">;<br>
 def fno_lto_unit: Flag<["-"], "fno-lto-unit">;<br>
-def femit_debug_entry_values : Flag<["-"], "femit-debug-entry-values">,<br>
-    HelpText<"Enables debug info about call site parameter's entry values">;<br>
 def fdebug_pass_manager : Flag<["-"], "fdebug-pass-manager">,<br>
     HelpText<"Prints debug information for the new pass manager">;<br>
 def fno_debug_pass_manager : Flag<["-"], "fno-debug-pass-manager">,<br>
<br>
diff  --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp<br>
index 28e4ecc7b4bf..e8f2524a25d5 100644<br>
--- a/clang/lib/CodeGen/BackendUtil.cpp<br>
+++ b/clang/lib/CodeGen/BackendUtil.cpp<br>
@@ -491,7 +491,6 @@ static void initTargetOptions(llvm::TargetOptions &Options,<br>
   Options.DebuggerTuning = CodeGenOpts.getDebuggerTuning();<br>
   Options.EmitStackSizeSection = CodeGenOpts.StackSizeSection;<br>
   Options.EmitAddrsig = CodeGenOpts.Addrsig;<br>
-  Options.EnableDebugEntryValues = CodeGenOpts.EnableDebugEntryValues;<br>
   Options.ForceDwarfFrameSection = CodeGenOpts.ForceDwarfFrameSection;<br>
   Options.EmitCallSiteInfo = CodeGenOpts.EmitCallSiteInfo;<br>
<br>
<br>
diff  --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp<br>
index 94dab4c85614..eeb1927177c5 100644<br>
--- a/clang/lib/CodeGen/CGDebugInfo.cpp<br>
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp<br>
@@ -4883,8 +4883,7 @@ llvm::DINode::DIFlags CGDebugInfo::getCallSiteRelatedAttrs() const {<br>
       (CGM.getCodeGenOpts().getDebuggerTuning() == llvm::DebuggerKind::LLDB ||<br>
        CGM.getCodeGenOpts().getDebuggerTuning() == llvm::DebuggerKind::GDB);<br>
<br>
-  if (!SupportsDWARFv4Ext && CGM.getCodeGenOpts().DwarfVersion < 5 &&<br>
-      !CGM.getCodeGenOpts().EnableDebugEntryValues)<br>
+  if (!SupportsDWARFv4Ext && CGM.getCodeGenOpts().DwarfVersion < 5)<br>
     return llvm::DINode::FlagZero;<br>
<br>
   return llvm::DINode::FlagAllCallsDescribed;<br>
<br>
diff  --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp<br>
index e2b24f0cfcea..2e432ad9ce14 100644<br>
--- a/clang/lib/Frontend/CompilerInvocation.cpp<br>
+++ b/clang/lib/Frontend/CompilerInvocation.cpp<br>
@@ -788,10 +788,8 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,<br>
<br>
   llvm::Triple T(TargetOpts.Triple);<br>
   if (Opts.OptimizationLevel > 0 && Opts.hasReducedDebugInfo() &&<br>
-      llvm::is_contained(DebugEntryValueArchs, T.getArch())) {<br>
-    Opts.EnableDebugEntryValues = Args.hasArg(OPT_femit_debug_entry_values);<br>
+      llvm::is_contained(DebugEntryValueArchs, T.getArch()))<br>
     Opts.EmitCallSiteInfo = true;<br>
-  }<br>
<br>
   Opts.DisableO0ImplyOptNone = Args.hasArg(OPT_disable_O0_optnone);<br>
   Opts.DisableRedZone = Args.hasArg(OPT_disable_red_zone);<br>
<br>
diff  --git a/clang/test/CodeGen/debug-info-extern-call.c b/clang/test/CodeGen/debug-info-extern-call.c<br>
index da3764f7359e..072e578b5898 100644<br>
--- a/clang/test/CodeGen/debug-info-extern-call.c<br>
+++ b/clang/test/CodeGen/debug-info-extern-call.c<br>
@@ -1,7 +1,7 @@<br>
 // When entry values are emitted, expect a subprogram for extern decls so that<br>
 // the dwarf generator can describe call site parameters at extern call sites.<br>
 //<br>
-// RUN: %clang -Xclang -femit-debug-entry-values -g -O2 -target x86_64-none-linux-gnu -S -emit-llvm %s -o - \<br>
+// RUN: %clang -g -O2 -target x86_64-none-linux-gnu -S -emit-llvm %s -o - \<br>
 // RUN:   | FileCheck %s -check-prefix=DECLS-FOR-EXTERN<br>
<br>
 // Similarly, when the debugger tuning is gdb, expect a subprogram for extern<br>
<br>
diff  --git a/clang/test/CodeGenCXX/dbg-info-all-calls-described.cpp b/clang/test/CodeGenCXX/dbg-info-all-calls-described.cpp<br>
index 72caf119f869..e64e07cdb748 100644<br>
--- a/clang/test/CodeGenCXX/dbg-info-all-calls-described.cpp<br>
+++ b/clang/test/CodeGenCXX/dbg-info-all-calls-described.cpp<br>
@@ -15,13 +15,6 @@<br>
 // RUN: | FileCheck %s -check-prefix=HAS-ATTR \<br>
 // RUN:     -implicit-check-not=DISubprogram -implicit-check-not=DIFlagAllCallsDescribed<br>
<br>
-// Supported: DWARF4 + GDB tuning by using '-femit-debug-entry-values'<br>
-// RUN: %clang_cc1 -femit-debug-entry-values -emit-llvm -triple x86_64-linux-gnu \<br>
-// RUN:   %s -o - -O1 -disable-llvm-passes -debugger-tuning=gdb \<br>
-// RUN:   -debug-info-kind=standalone -dwarf-version=4 \<br>
-// RUN: | FileCheck %s -check-prefix=HAS-ATTR \<br>
-// RUN:     -implicit-check-not=DIFlagAllCallsDescribed<br>
-<br>
 // Note: DIFlagAllCallsDescribed may have been enabled prematurely when tuning<br>
 // for GDB under -gdwarf-4 in <a href="https://reviews.llvm.org/D69743" rel="noreferrer" target="_blank">https://reviews.llvm.org/D69743</a>. It's possible<br>
 // this should have been 'Unsupported' until entry values emission was enabled<br>
@@ -34,15 +27,15 @@<br>
 // RUN: | FileCheck %s -check-prefix=HAS-ATTR \<br>
 // RUN:     -implicit-check-not=DIFlagAllCallsDescribed<br>
<br>
-// Supported: DWARF4 + LLDB tuning by using '-femit-debug-entry-values'<br>
-// RUN: %clang_cc1 -femit-debug-entry-values -emit-llvm -triple x86_64-linux-gnu \<br>
+// Supported: DWARF4 + LLDB, -O1<br>
+// RUN: %clang_cc1 -emit-llvm -triple x86_64-linux-gnu \<br>
 // RUN:   %s -o - -O1 -disable-llvm-passes -debugger-tuning=lldb \<br>
 // RUN:   -debug-info-kind=standalone -dwarf-version=4 \<br>
 // RUN: | FileCheck %s -check-prefix=HAS-ATTR \<br>
 // RUN:     -implicit-check-not=DIFlagAllCallsDescribed<br>
<br>
-// Unsupported: -O0 + '-femit-debug-entry-values'<br>
-// RUN: %clang_cc1 -femit-debug-entry-values -emit-llvm -triple x86_64-linux-gnu \<br>
+// Unsupported: -O0<br>
+// RUN: %clang_cc1 -emit-llvm -triple x86_64-linux-gnu \<br>
 // RUN:   %s -o - -O0 -disable-llvm-passes -debugger-tuning=gdb \<br>
 // RUN:   -debug-info-kind=standalone -dwarf-version=4 \<br>
 // RUN: | FileCheck %s -check-prefix=NO-ATTR<br>
<br>
diff  --git a/lldb/packages/Python/lldbsuite/test/decorators.py b/lldb/packages/Python/lldbsuite/test/decorators.py<br>
index 32ae8ee9b000..cc28ae901634 100644<br>
--- a/lldb/packages/Python/lldbsuite/test/decorators.py<br>
+++ b/lldb/packages/Python/lldbsuite/test/decorators.py<br>
@@ -702,7 +702,7 @@ def is_compiler_clang_with_call_site_info(self):<br>
<br>
         f = tempfile.NamedTemporaryFile()<br>
         cmd = "echo 'int main() {}' | " \<br>
-              "%s -g -glldb -O1 -Xclang -femit-debug-entry-values -S -emit-llvm -x c -o %s -" % (compiler_path, <a href="http://f.name" rel="noreferrer" target="_blank">f.name</a>)<br>
+              "%s -g -glldb -O1 -S -emit-llvm -x c -o %s -" % (compiler_path, <a href="http://f.name" rel="noreferrer" target="_blank">f.name</a>)<br>
         if os.popen(cmd).close() is not None:<br>
             return "Compiler can't compile with call site info enabled"<br>
<br>
<br>
diff  --git a/lldb/test/API/functionalities/param_entry_vals/basic_entry_values_x86_64/Makefile b/lldb/test/API/functionalities/param_entry_vals/basic_entry_values_x86_64/Makefile<br>
index db8fa57abb91..ab505a684126 100644<br>
--- a/lldb/test/API/functionalities/param_entry_vals/basic_entry_values_x86_64/Makefile<br>
+++ b/lldb/test/API/functionalities/param_entry_vals/basic_entry_values_x86_64/Makefile<br>
@@ -1,3 +1,3 @@<br>
 CXX_SOURCES := main.cpp<br>
-CXXFLAGS_EXTRAS := -O2 -glldb -Xclang -femit-debug-entry-values<br>
+CXXFLAGS_EXTRAS := -O2 -glldb<br>
 include Makefile.rules<br>
<br>
diff  --git a/llvm/include/llvm/Target/TargetMachine.h b/llvm/include/llvm/Target/TargetMachine.h<br>
index fdf1313e5491..c2e14d14d351 100644<br>
--- a/llvm/include/llvm/Target/TargetMachine.h<br>
+++ b/llvm/include/llvm/Target/TargetMachine.h<br>
@@ -237,6 +237,9 @@ class TargetMachine {<br>
   void setSupportsDefaultOutlining(bool Enable) {<br>
     Options.SupportsDefaultOutlining = Enable;<br>
   }<br>
+  void setSupportsDebugEntryValues(bool Enable) {<br>
+    Options.SupportsDebugEntryValues = Enable;<br>
+  }<br>
<br>
   bool shouldPrintMachineCode() const { return Options.PrintMachineCode; }<br>
<br>
<br>
diff  --git a/llvm/include/llvm/Target/TargetOptions.h b/llvm/include/llvm/Target/TargetOptions.h<br>
index 9378e290bed1..7282040a352f 100644<br>
--- a/llvm/include/llvm/Target/TargetOptions.h<br>
+++ b/llvm/include/llvm/Target/TargetOptions.h<br>
@@ -134,8 +134,8 @@ namespace llvm {<br>
           EmulatedTLS(false), ExplicitEmulatedTLS(false), EnableIPRA(false),<br>
           EmitStackSizeSection(false), EnableMachineOutliner(false),<br>
           SupportsDefaultOutlining(false), EmitAddrsig(false),<br>
-          EmitCallSiteInfo(false), EnableDebugEntryValues(false),<br>
-          ForceDwarfFrameSection(false) {}<br>
+          EmitCallSiteInfo(false), SupportsDebugEntryValues(false),<br>
+          EnableDebugEntryValues(false), ForceDwarfFrameSection(false) {}<br>
<br>
     /// PrintMachineCode - This flag is enabled when the -print-machineinstrs<br>
     /// option is specified on the command line, and should enable debugging<br>
@@ -286,8 +286,16 @@ namespace llvm {<br>
     /// info, and it is restricted only to optimized code. This can be used for<br>
     /// something else, so that should be controlled in the frontend.<br>
     unsigned EmitCallSiteInfo : 1;<br>
-    /// Emit debug info about parameter's entry values.<br>
-    unsigned EnableDebugEntryValues : 1;<br>
+    /// Set if the target supports the debug entry values by default.<br>
+    unsigned SupportsDebugEntryValues : 1;<br>
+    /// When set to true, the EnableDebugEntryValues option forces production<br>
+    /// of debug entry values even if the target does not officially support<br>
+    /// it. Useful for testing purposes only. This flag should never be checked<br>
+    /// directly, always use \ref ShouldEmitDebugEntryValues instead.<br>
+     unsigned EnableDebugEntryValues : 1;<br>
+    /// NOTE: There are targets that still do not support the debug entry values<br>
+    /// production.<br>
+    bool ShouldEmitDebugEntryValues() const;<br>
<br>
     /// Emit DWARF debug frame section.<br>
     unsigned ForceDwarfFrameSection : 1;<br>
<br>
diff  --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp<br>
index 7efeb1a3736a..7b469d496b70 100644<br>
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp<br>
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp<br>
@@ -95,6 +95,10 @@ static cl::opt<bool> UseDwarfRangesBaseAddressSpecifier(<br>
     "use-dwarf-ranges-base-address-specifier", cl::Hidden,<br>
     cl::desc("Use base address specifiers in debug_ranges"), cl::init(false));<br>
<br>
+static cl::opt<bool> EmitDwarfDebugEntryValues(<br>
+    "emit-debug-entry-values", cl::Hidden,<br>
+    cl::desc("Emit the debug entry values"), cl::init(false));<br>
+<br>
 static cl::opt<bool> GenerateARangeSection("generate-arange-section",<br>
                                            cl::Hidden,<br>
                                            cl::desc("Generate dwarf aranges"),<br>
@@ -419,6 +423,12 @@ DwarfDebug::DwarfDebug(AsmPrinter *A, Module *M)<br>
   // a monolithic string offsets table without any header.<br>
   UseSegmentedStringOffsetsTable = DwarfVersion >= 5;<br>
<br>
+  // Emit call-site-param debug info for GDB and LLDB, if the target supports<br>
+  // the debug entry values feature. It can also be enabled explicitly.<br>
+  EmitDebugEntryValues = (Asm->TM.Options.ShouldEmitDebugEntryValues() &&<br>
+                          (tuneForGDB() || tuneForLLDB())) ||<br>
+                         EmitDwarfDebugEntryValues;<br>
+<br>
   Asm->OutStreamer->getContext().setDwarfVersion(DwarfVersion);<br>
 }<br>
<br>
@@ -886,9 +896,8 @@ void DwarfDebug::constructCallSiteEntryDIEs(const DISubprogram &SP,<br>
       DIE &CallSiteDIE = CU.constructCallSiteEntryDIE(ScopeDIE, CalleeDIE,<br>
                                                       IsTail, PCAddr, CallReg);<br>
<br>
-      // GDB and LLDB support call site parameter debug info.<br>
-      if (Asm->TM.Options.EnableDebugEntryValues &&<br>
-          (tuneForGDB() || tuneForLLDB())) {<br>
+      // Optionally emit call-site-param debug info.<br>
+      if (emitDebugEntryValues()) {<br>
         ParamSet Params;<br>
         // Try to interpret values of call site parameters.<br>
         collectCallSiteParameters(&MI, Params);<br>
<br>
diff  --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h<br>
index a44960589d89..882fc739d792 100644<br>
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h<br>
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h<br>
@@ -386,6 +386,11 @@ class DwarfDebug : public DebugHandlerBase {<br>
   /// a monolithic sequence of string offsets.<br>
   bool UseSegmentedStringOffsetsTable;<br>
<br>
+  /// Enable production of call site parameters needed to print the debug entry<br>
+  /// values. Useful for testing purposes when a debugger does not support the<br>
+  /// feature yet.<br>
+  bool EmitDebugEntryValues;<br>
+<br>
   /// Separated Dwarf Variables<br>
   /// In general these will all be for bits that are left in the<br>
   /// original object file, rather than things that are meant<br>
@@ -708,6 +713,10 @@ class DwarfDebug : public DebugHandlerBase {<br>
     return UseSegmentedStringOffsetsTable;<br>
   }<br>
<br>
+  bool emitDebugEntryValues() const {<br>
+    return EmitDebugEntryValues;<br>
+  }<br>
+<br>
   bool shareAcrossDWOCUs() const;<br>
<br>
   /// Returns the Dwarf Version.<br>
<br>
diff  --git a/llvm/lib/CodeGen/CommandFlags.cpp b/llvm/lib/CodeGen/CommandFlags.cpp<br>
index 7acb84df582f..d5dc49a91177 100644<br>
--- a/llvm/lib/CodeGen/CommandFlags.cpp<br>
+++ b/llvm/lib/CodeGen/CommandFlags.cpp<br>
@@ -380,7 +380,7 @@ codegen::RegisterCodeGenFlags::RegisterCodeGenFlags() {<br>
<br>
   static cl::opt<bool> EnableDebugEntryValues(<br>
       "debug-entry-values",<br>
-      cl::desc("Emit debug info about parameter's entry values"),<br>
+      cl::desc("Enable debug info for the debug entry values."),<br>
       cl::init(false));<br>
   CGBINDOPT(EnableDebugEntryValues);<br>
<br>
<br>
diff  --git a/llvm/lib/CodeGen/LiveDebugValues.cpp b/llvm/lib/CodeGen/LiveDebugValues.cpp<br>
index 94c5cc58ac1e..a013c419b7c7 100644<br>
--- a/llvm/lib/CodeGen/LiveDebugValues.cpp<br>
+++ b/llvm/lib/CodeGen/LiveDebugValues.cpp<br>
@@ -1125,7 +1125,7 @@ void LiveDebugValues::transferRegisterDef(<br>
<br>
   if (auto *TPC = getAnalysisIfAvailable<TargetPassConfig>()) {<br>
     auto &TM = TPC->getTM<TargetMachine>();<br>
-    if (TM.Options.EnableDebugEntryValues)<br>
+    if (TM.Options.ShouldEmitDebugEntryValues())<br>
       emitEntryValues(MI, OpenRanges, VarLocIDs, Transfers, KillSet);<br>
   }<br>
 }<br>
@@ -1630,7 +1630,7 @@ void LiveDebugValues::recordEntryValue(const MachineInstr &MI,<br>
                                        VarLocMap &VarLocIDs) {<br>
   if (auto *TPC = getAnalysisIfAvailable<TargetPassConfig>()) {<br>
     auto &TM = TPC->getTM<TargetMachine>();<br>
-    if (!TM.Options.EnableDebugEntryValues)<br>
+    if (!TM.Options.ShouldEmitDebugEntryValues())<br>
       return;<br>
   }<br>
<br>
<br>
diff  --git a/llvm/lib/CodeGen/TargetOptionsImpl.cpp b/llvm/lib/CodeGen/TargetOptionsImpl.cpp<br>
index d794a261ecb2..4866d4c171c0 100644<br>
--- a/llvm/lib/CodeGen/TargetOptionsImpl.cpp<br>
+++ b/llvm/lib/CodeGen/TargetOptionsImpl.cpp<br>
@@ -45,3 +45,9 @@ bool TargetOptions::DisableFramePointerElim(const MachineFunction &MF) const {<br>
 bool TargetOptions::HonorSignDependentRoundingFPMath() const {<br>
   return !UnsafeFPMath && HonorSignDependentRoundingFPMathOption;<br>
 }<br>
+<br>
+/// NOTE: There are targets that still do not support the debug entry values<br>
+/// production.<br>
+bool TargetOptions::ShouldEmitDebugEntryValues() const {<br>
+  return SupportsDebugEntryValues || EnableDebugEntryValues;<br>
+}<br>
<br>
diff  --git a/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp b/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp<br>
index a5676d286ebe..62ae04a07808 100644<br>
--- a/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp<br>
+++ b/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp<br>
@@ -309,6 +309,9 @@ AArch64TargetMachine::AArch64TargetMachine(const Target &T, const Triple &TT,<br>
<br>
   // AArch64 supports default outlining behaviour.<br>
   setSupportsDefaultOutlining(true);<br>
+<br>
+  // AArch64 supports the debug entry values.<br>
+  setSupportsDebugEntryValues(true);<br>
 }<br>
<br>
 AArch64TargetMachine::~AArch64TargetMachine() = default;<br>
<br>
diff  --git a/llvm/lib/Target/ARM/ARMTargetMachine.cpp b/llvm/lib/Target/ARM/ARMTargetMachine.cpp<br>
index 84876eda33a6..63aa65267ef2 100644<br>
--- a/llvm/lib/Target/ARM/ARMTargetMachine.cpp<br>
+++ b/llvm/lib/Target/ARM/ARMTargetMachine.cpp<br>
@@ -243,6 +243,9 @@ ARMBaseTargetMachine::ARMBaseTargetMachine(const Target &T, const Triple &TT,<br>
     this->Options.NoTrapAfterNoreturn = true;<br>
   }<br>
<br>
+  // ARM supports the debug entry values.<br>
+  setSupportsDebugEntryValues(true);<br>
+<br>
   initAsmInfo();<br>
 }<br>
<br>
<br>
diff  --git a/llvm/lib/Target/X86/X86TargetMachine.cpp b/llvm/lib/Target/X86/X86TargetMachine.cpp<br>
index 22b4e2805a5e..0cfa7bb04771 100644<br>
--- a/llvm/lib/Target/X86/X86TargetMachine.cpp<br>
+++ b/llvm/lib/Target/X86/X86TargetMachine.cpp<br>
@@ -232,6 +232,9 @@ X86TargetMachine::X86TargetMachine(const Target &T, const Triple &TT,<br>
<br>
   setMachineOutliner(true);<br>
<br>
+  // x86 supports the debug entry values.<br>
+  setSupportsDebugEntryValues(true);<br>
+<br>
   initAsmInfo();<br>
 }<br>
<br>
<br>
diff  --git a/llvm/test/CodeGen/MIR/Hexagon/bundled-call-site-info.mir b/llvm/test/CodeGen/MIR/Hexagon/bundled-call-site-info.mir<br>
index fec542223fc9..e4100543d3c7 100644<br>
--- a/llvm/test/CodeGen/MIR/Hexagon/bundled-call-site-info.mir<br>
+++ b/llvm/test/CodeGen/MIR/Hexagon/bundled-call-site-info.mir<br>
@@ -1,3 +1,5 @@<br>
+# We do not support the call site info for the target now, so we use the experimental option (-emit-call-site-info -debug-entry-values).<br>
+<br>
 # RUN: llc -emit-call-site-info -debug-entry-values -run-pass=none -verify-machineinstrs -o - %s | FileCheck %s<br>
<br>
 # Verify that it is possible to read and write MIR where a callSites entry<br>
<br>
diff  --git a/llvm/test/CodeGen/MIR/X86/call-site-info-error4.mir b/llvm/test/CodeGen/MIR/X86/call-site-info-error4.mir<br>
index 2472aa707e16..d5bd82c71080 100644<br>
--- a/llvm/test/CodeGen/MIR/X86/call-site-info-error4.mir<br>
+++ b/llvm/test/CodeGen/MIR/X86/call-site-info-error4.mir<br>
@@ -1,5 +1,5 @@<br>
-# RUN: not llc -mtriple=x86_64-- -run-pass none %s -o - 2>&1 | FileCheck %s<br>
-# CHECK: Call site info provided but not used<br>
+# RUN: llc -emit-call-site-info -mtriple=x86_64-- -run-pass none %s -o - 2>&1 | FileCheck %s<br>
+# CHECK-NOT: Call site info provided but not used<br>
 --- |<br>
   define dso_local i32 @baa(i32 %a) local_unnamed_addr {<br>
   entry:<br>
<br>
diff  --git a/llvm/test/CodeGen/X86/call-site-info-output.ll b/llvm/test/CodeGen/X86/call-site-info-output.ll<br>
index a0438f0c2b98..0686f184b526 100644<br>
--- a/llvm/test/CodeGen/X86/call-site-info-output.ll<br>
+++ b/llvm/test/CodeGen/X86/call-site-info-output.ll<br>
@@ -1,6 +1,6 @@<br>
 ; Test call site info MIR printer and parser.Parser assertions and machine<br>
 ; verifier will check the rest;<br>
-; RUN: llc -emit-call-site-info -debug-entry-values %s -stop-before=finalize-isel -o %t.mir<br>
+; RUN: llc -emit-call-site-info %s -stop-before=finalize-isel -o %t.mir<br>
 ; RUN: cat %t.mir | FileCheck %s<br>
 ; CHECK: name: fn2<br>
 ; CHECK: callSites:<br>
@@ -10,7 +10,7 @@<br>
 ; CHECK-NEXT:   arg: 0, reg: '$edi'<br>
 ; CHECK-NEXT:   arg: 1, reg: '$esi'<br>
 ; CHECK-NEXT:   arg: 2, reg: '$edx'<br>
-; RUN: llc -emit-call-site-info -debug-entry-values %t.mir -run-pass=finalize-isel -o -| FileCheck %s --check-prefix=PARSER<br>
+; RUN: llc -emit-call-site-info %t.mir -run-pass=finalize-isel -o -| FileCheck %s --check-prefix=PARSER<br>
 ; Verify that we are able to parse output mir and that we are getting the same result.<br>
 ; PARSER: name: fn2<br>
 ; PARSER: callSites:<br>
<br>
diff  --git a/llvm/test/DebugInfo/AArch64/dbgcall-site-float-entry-value.ll b/llvm/test/DebugInfo/AArch64/dbgcall-site-float-entry-value.ll<br>
index a925cd0c1452..3b91d17dc628 100644<br>
--- a/llvm/test/DebugInfo/AArch64/dbgcall-site-float-entry-value.ll<br>
+++ b/llvm/test/DebugInfo/AArch64/dbgcall-site-float-entry-value.ll<br>
@@ -1,4 +1,4 @@<br>
-; RUN: llc -mtriple aarch64-linux-gnu -emit-call-site-info -debug-entry-values -filetype=obj -o - %s | llvm-dwarfdump - | FileCheck %s<br>
+; RUN: llc -mtriple aarch64-linux-gnu -emit-call-site-info -filetype=obj -o - %s | llvm-dwarfdump - | FileCheck %s<br>
<br>
 ; Based on the following C reproducer:<br>
 ;<br>
<br>
diff  --git a/llvm/test/DebugInfo/MIR/AArch64/dbgcall-site-orr-moves.mir b/llvm/test/DebugInfo/MIR/AArch64/dbgcall-site-orr-moves.mir<br>
index ed2a7d903885..e3ee2cac4fa9 100644<br>
--- a/llvm/test/DebugInfo/MIR/AArch64/dbgcall-site-orr-moves.mir<br>
+++ b/llvm/test/DebugInfo/MIR/AArch64/dbgcall-site-orr-moves.mir<br>
@@ -1,4 +1,4 @@<br>
-# RUN: llc -emit-call-site-info -debug-entry-values -start-after=livedebugvalues -filetype=obj -o - %s | llvm-dwarfdump - | FileCheck %s<br>
+# RUN: llc -emit-call-site-info -start-after=livedebugvalues -filetype=obj -o - %s | llvm-dwarfdump - | FileCheck %s<br>
<br>
 # Based on the following C reproducer:<br>
 #<br>
<br>
diff  --git a/llvm/test/DebugInfo/MIR/ARM/call-site-info-vmovd.mir b/llvm/test/DebugInfo/MIR/ARM/call-site-info-vmovd.mir<br>
index bd42c229d29c..8f7f789eb8fb 100644<br>
--- a/llvm/test/DebugInfo/MIR/ARM/call-site-info-vmovd.mir<br>
+++ b/llvm/test/DebugInfo/MIR/ARM/call-site-info-vmovd.mir<br>
@@ -1,4 +1,4 @@<br>
-# RUN: llc -O1 -emit-call-site-info -debug-entry-values -filetype=obj -mtriple thumbv7em-apple-unknown-macho -start-after=machineverifier %s -o %t.o<br>
+# RUN: llc -O1 -emit-call-site-info -filetype=obj -mtriple thumbv7em-apple-unknown-macho -start-after=machineverifier %s -o %t.o<br>
 # RUN: llvm-dwarfdump %t.o | FileCheck %s<br>
<br>
 # Crash test, reduced from:<br>
<br>
diff  --git a/llvm/test/DebugInfo/MIR/ARM/call-site-info-vmovs.mir b/llvm/test/DebugInfo/MIR/ARM/call-site-info-vmovs.mir<br>
index 2cf7e4d1c87f..e3f1031796a0 100644<br>
--- a/llvm/test/DebugInfo/MIR/ARM/call-site-info-vmovs.mir<br>
+++ b/llvm/test/DebugInfo/MIR/ARM/call-site-info-vmovs.mir<br>
@@ -1,4 +1,4 @@<br>
-# RUN: llc -O1 -emit-call-site-info -debug-entry-values -filetype=obj -mtriple thumbv7em-apple-unknown-macho -start-after=machineverifier %s -o %t.o<br>
+# RUN: llc -O1 -emit-call-site-info -filetype=obj -mtriple thumbv7em-apple-unknown-macho -start-after=machineverifier %s -o %t.o<br>
 # RUN: llvm-dwarfdump %t.o | FileCheck %s<br>
<br>
 # Crash test, reduced from:<br>
<br>
diff  --git a/llvm/test/DebugInfo/MIR/ARM/dbgcall-site-propagated-value.mir b/llvm/test/DebugInfo/MIR/ARM/dbgcall-site-propagated-value.mir<br>
index 5b84d9e9627f..b25b1c90d634 100644<br>
--- a/llvm/test/DebugInfo/MIR/ARM/dbgcall-site-propagated-value.mir<br>
+++ b/llvm/test/DebugInfo/MIR/ARM/dbgcall-site-propagated-value.mir<br>
@@ -1,4 +1,4 @@<br>
-# RUN: llc -emit-call-site-info -debug-entry-values -run-pass=livedebugvalues -o - %s | FileCheck %s<br>
+# RUN: llc -run-pass=livedebugvalues -o - %s | FileCheck %s<br>
<br>
 # Based on the following C reproducer:<br>
 #<br>
@@ -106,10 +106,6 @@<br>
 name:            caller<br>
 alignment:       4<br>
 tracksRegLiveness: true<br>
-callSites:<br>
-  - { bb: 0, offset: 6 }<br>
-  - { bb: 0, offset: 9, fwdArgRegs:<br>
-      - { arg: 0, reg: '$r0' } }<br>
 body:             |<br>
   bb.0:<br>
     liveins: $lr<br>
<br>
diff  --git a/llvm/test/DebugInfo/MIR/Hexagon/dbgcall-site-instr-before-bundled-call.mir b/llvm/test/DebugInfo/MIR/Hexagon/dbgcall-site-instr-before-bundled-call.mir<br>
index 3ae23d4189bf..9baa815a0458 100644<br>
--- a/llvm/test/DebugInfo/MIR/Hexagon/dbgcall-site-instr-before-bundled-call.mir<br>
+++ b/llvm/test/DebugInfo/MIR/Hexagon/dbgcall-site-instr-before-bundled-call.mir<br>
@@ -1,4 +1,6 @@<br>
-# RUN: llc -mtriple hexagon -emit-call-site-info -debug-entry-values -start-after=machineverifier -filetype=obj %s -o - | llvm-dwarfdump - | FileCheck %s<br>
+# We do not support the call site info for the target now, so we use the experimental option (-emit-call-site-info -debug-entry-values).<br>
+<br>
+# RUN: llc -emit-call-site-info -debug-entry-values -mtriple hexagon -start-after=machineverifier -filetype=obj %s -o - | llvm-dwarfdump - | FileCheck %s<br>
<br>
 # Based on the following C reproducer:<br>
 #<br>
<br>
diff  --git a/llvm/test/DebugInfo/MIR/Hexagon/live-debug-values-bundled-entry-values.mir b/llvm/test/DebugInfo/MIR/Hexagon/live-debug-values-bundled-entry-values.mir<br>
index 8bb0b3202acd..2ed3672c2ec3 100644<br>
--- a/llvm/test/DebugInfo/MIR/Hexagon/live-debug-values-bundled-entry-values.mir<br>
+++ b/llvm/test/DebugInfo/MIR/Hexagon/live-debug-values-bundled-entry-values.mir<br>
@@ -1,3 +1,5 @@<br>
+# We do not support the call site info for the target now, so we use the experimental option (-emit-call-site-info -debug-entry-values).<br>
+<br>
 # RUN: llc -emit-call-site-info -debug-entry-values -run-pass=livedebugvalues -o - %s | FileCheck %s<br>
<br>
 # Verify that the entry values for the input parameters are inserted after the<br>
<br>
diff  --git a/llvm/test/DebugInfo/MIR/SystemZ/call-site-lzer.mir b/llvm/test/DebugInfo/MIR/SystemZ/call-site-lzer.mir<br>
index 3cf41467f7f9..f173c9d780fa 100644<br>
--- a/llvm/test/DebugInfo/MIR/SystemZ/call-site-lzer.mir<br>
+++ b/llvm/test/DebugInfo/MIR/SystemZ/call-site-lzer.mir<br>
@@ -1,3 +1,5 @@<br>
+# We do not support the call site info for the target now, so we use the experimental option (-emit-call-site-info -debug-entry-values).<br>
+<br>
 # RUN: llc -emit-call-site-info -debug-entry-values -start-after=livedebugvalues -o - %s | FileCheck %s<br>
<br>
 # This test would previously trigger an assertion when trying to describe the<br>
<br>
diff  --git a/llvm/test/DebugInfo/MIR/X86/DW_OP_entry_value.mir b/llvm/test/DebugInfo/MIR/X86/DW_OP_entry_value.mir<br>
index 4e5a07321d42..f7f74b628d16 100644<br>
--- a/llvm/test/DebugInfo/MIR/X86/DW_OP_entry_value.mir<br>
+++ b/llvm/test/DebugInfo/MIR/X86/DW_OP_entry_value.mir<br>
@@ -1,4 +1,4 @@<br>
-# RUN: llc -emit-call-site-info -debug-entry-values -start-before=livedebugvalues -mtriple=x86_64-apple-darwin -o %t %s -filetype=obj<br>
+# RUN: llc -start-before=livedebugvalues -mtriple=x86_64-apple-darwin -o %t %s -filetype=obj<br>
 # RUN: llvm-dwarfdump %t | FileCheck %s<br>
 #<br>
 # int global;<br>
<br>
diff  --git a/llvm/test/DebugInfo/MIR/X86/call-site-gnu-vs-dwarf5-attrs.mir b/llvm/test/DebugInfo/MIR/X86/call-site-gnu-vs-dwarf5-attrs.mir<br>
index 891fbb60b36e..63d03050918f 100644<br>
--- a/llvm/test/DebugInfo/MIR/X86/call-site-gnu-vs-dwarf5-attrs.mir<br>
+++ b/llvm/test/DebugInfo/MIR/X86/call-site-gnu-vs-dwarf5-attrs.mir<br>
@@ -1,17 +1,21 @@<br>
 # Test the call site encoding in DWARF5 vs GNU extensions.<br>
 #<br>
-# RUN: llc -dwarf-version 4 -debugger-tune=gdb -emit-call-site-info -debug-entry-values -filetype=obj \<br>
+# RUN: llc -emit-call-site-info -dwarf-version 4 -debugger-tune=gdb -filetype=obj \<br>
 # RUN:     -mtriple=x86_64-unknown-unknown -start-after=machineverifier -o - %s  \<br>
 # RUN:     | llvm-dwarfdump - | FileCheck %s -check-prefixes=CHECK-GNU<br>
 #<br>
-# RUN: llc -dwarf-version 5 -debugger-tune=lldb -emit-call-site-info -debug-entry-values -filetype=obj \<br>
+# RUN: llc -emit-call-site-info -dwarf-version 5 -debugger-tune=lldb -filetype=obj \<br>
 # RUN:     -mtriple=x86_64-unknown-unknown -start-after=machineverifier -o - %s   \<br>
 # RUN:     | llvm-dwarfdump - | FileCheck %s -check-prefixes=CHECK-DWARF5<br>
 #<br>
-# RUN: llc -dwarf-version 5 -emit-call-site-info -debug-entry-values -filetype=obj \<br>
+# RUN: llc -emit-call-site-info -dwarf-version 5 -filetype=obj \<br>
 # RUN:     -mtriple=x86_64-unknown-unknown -start-after=machineverifier -o - %s   \<br>
 # RUN:     | llvm-dwarfdump - | FileCheck %s -check-prefixes=CHECK-DWARF5<br>
 #<br>
+# RUN: llc -emit-call-site-info -dwarf-version 5 -filetype=obj -debugger-tune=sce \<br>
+# RUN:     -emit-debug-entry-values -debug-entry-values -mtriple=x86_64-unknown-unknown \<br>
+# RUN:     -start-after=machineverifier -o - %s | llvm-dwarfdump - | FileCheck %s -check-prefixes=CHECK-DWARF5<br>
+#<br>
 # This is based on the following reproducer:<br>
 #<br>
 # extern void fn();<br>
<br>
diff  --git a/llvm/test/DebugInfo/MIR/X86/callsite-stack-value.mir b/llvm/test/DebugInfo/MIR/X86/callsite-stack-value.mir<br>
index 6d69f0630202..5b9ecf08150b 100644<br>
--- a/llvm/test/DebugInfo/MIR/X86/callsite-stack-value.mir<br>
+++ b/llvm/test/DebugInfo/MIR/X86/callsite-stack-value.mir<br>
@@ -1,5 +1,5 @@<br>
 # RUN: llc -start-after=livedebugvalues -mtriple=x86_64-apple-darwin -o - %s -filetype=obj \<br>
-# RUN:   -emit-call-site-info -debug-entry-values | llvm-dwarfdump - | FileCheck %s -implicit-check-not=call_site_parameter<br>
+# RUN:   -emit-call-site-info | llvm-dwarfdump - | FileCheck %s -implicit-check-not=call_site_parameter<br>
<br>
 # CHECK: DW_TAG_formal_parameter<br>
 # CHECK-NEXT: DW_AT_location<br>
<br>
diff  --git a/llvm/test/DebugInfo/MIR/X86/dbgcall-site-copy-super-sub.mir b/llvm/test/DebugInfo/MIR/X86/dbgcall-site-copy-super-sub.mir<br>
index 01a2b887a60b..347a0ec09bb2 100644<br>
--- a/llvm/test/DebugInfo/MIR/X86/dbgcall-site-copy-super-sub.mir<br>
+++ b/llvm/test/DebugInfo/MIR/X86/dbgcall-site-copy-super-sub.mir<br>
@@ -1,4 +1,4 @@<br>
-# RUN: llc -emit-call-site-info -debug-entry-values -start-after=livedebugvalues -filetype=obj %s -o -| llvm-dwarfdump -| FileCheck %s<br>
+# RUN: llc -emit-call-site-info -start-after=livedebugvalues -filetype=obj %s -o -| llvm-dwarfdump -| FileCheck %s<br>
<br>
 # Based on the following reproducer:<br>
 #<br>
<br>
diff  --git a/llvm/test/DebugInfo/MIR/X86/dbgcall-site-interpretation.mir b/llvm/test/DebugInfo/MIR/X86/dbgcall-site-interpretation.mir<br>
index d6c6b3018462..b142313871eb 100644<br>
--- a/llvm/test/DebugInfo/MIR/X86/dbgcall-site-interpretation.mir<br>
+++ b/llvm/test/DebugInfo/MIR/X86/dbgcall-site-interpretation.mir<br>
@@ -1,4 +1,4 @@<br>
-# RUN: llc -emit-call-site-info -debug-entry-values -start-after=machineverifier -filetype=obj %s -o -| llvm-dwarfdump -| FileCheck %s<br>
+# RUN: llc -emit-call-site-info -start-after=machineverifier -filetype=obj %s -o -| llvm-dwarfdump -| FileCheck %s<br>
 #<br>
 # CHECK:        DW_TAG_GNU_call_site<br>
 # CHECK-NEXT:     DW_AT_abstract_origin {{.*}} "foo"<br>
<br>
diff  --git a/llvm/test/DebugInfo/MIR/X86/dbgcall-site-lea-interpretation.mir b/llvm/test/DebugInfo/MIR/X86/dbgcall-site-lea-interpretation.mir<br>
index 4d88fa9aab74..79e40b65c420 100644<br>
--- a/llvm/test/DebugInfo/MIR/X86/dbgcall-site-lea-interpretation.mir<br>
+++ b/llvm/test/DebugInfo/MIR/X86/dbgcall-site-lea-interpretation.mir<br>
@@ -1,4 +1,4 @@<br>
-# RUN: llc -emit-call-site-info -debug-entry-values -start-after=machineverifier -filetype=obj %s -o -| llvm-dwarfdump -| FileCheck %s<br>
+# RUN: llc -emit-call-site-info -start-after=machineverifier -filetype=obj %s -o -| llvm-dwarfdump -| FileCheck %s<br>
 # CHECK:        DW_TAG_GNU_call_site<br>
 # CHECK-NEXT:     DW_AT_abstract_origin {{.*}} "foo")<br>
 # CHECK-NEXT:     DW_AT_low_pc {{.*}}<br>
<br>
diff  --git a/llvm/test/DebugInfo/MIR/X86/dbgcall-site-partial-describe.mir b/llvm/test/DebugInfo/MIR/X86/dbgcall-site-partial-describe.mir<br>
index b97785d650c9..f0902bbe41d6 100644<br>
--- a/llvm/test/DebugInfo/MIR/X86/dbgcall-site-partial-describe.mir<br>
+++ b/llvm/test/DebugInfo/MIR/X86/dbgcall-site-partial-describe.mir<br>
@@ -1,4 +1,4 @@<br>
-# RUN: llc -emit-call-site-info -debug-entry-values -start-before=livedebugvalues -filetype=obj -o - %s \<br>
+# RUN: llc -emit-call-site-info -start-before=livedebugvalues -filetype=obj -o - %s \<br>
 # RUN:     | llvm-dwarfdump - | FileCheck %s --implicit-check-not=DW_TAG_GNU_call_site_parameter<br>
<br>
 --- |<br>
<br>
diff  --git a/llvm/test/DebugInfo/MIR/X86/dbgcall-site-reference.mir b/llvm/test/DebugInfo/MIR/X86/dbgcall-site-reference.mir<br>
index 81af598ba194..73927772ca08 100644<br>
--- a/llvm/test/DebugInfo/MIR/X86/dbgcall-site-reference.mir<br>
+++ b/llvm/test/DebugInfo/MIR/X86/dbgcall-site-reference.mir<br>
@@ -1,4 +1,4 @@<br>
-# RUN: llc -emit-call-site-info -debug-entry-values -start-before=livedebugvalues -filetype=obj -o - %s | llvm-dwarfdump - | FileCheck %s<br>
+# RUN: llc -start-before=livedebugvalues -filetype=obj -o - %s | llvm-dwarfdump - | FileCheck %s<br>
<br>
 # Based on the following C++ code:<br>
 # struct A { A(A &) {} };<br>
<br>
diff  --git a/llvm/test/DebugInfo/MIR/X86/dbgcall-site-reg-shuffle.mir b/llvm/test/DebugInfo/MIR/X86/dbgcall-site-reg-shuffle.mir<br>
index 1baf66393c49..27a03193e816 100644<br>
--- a/llvm/test/DebugInfo/MIR/X86/dbgcall-site-reg-shuffle.mir<br>
+++ b/llvm/test/DebugInfo/MIR/X86/dbgcall-site-reg-shuffle.mir<br>
@@ -1,4 +1,4 @@<br>
-# RUN: llc -emit-call-site-info -debug-entry-values -start-before=livedebugvalues -filetype=obj -o - %s \<br>
+# RUN: llc -emit-call-site-info -start-before=livedebugvalues -filetype=obj -o - %s \<br>
 # RUN:     | llvm-dwarfdump - | FileCheck %s --implicit-check-not=DW_TAG_GNU_call_site_parameter<br>
<br>
 --- |<br>
<br>
diff  --git a/llvm/test/DebugInfo/MIR/X86/dbgcall-site-two-fwd-reg-defs.mir b/llvm/test/DebugInfo/MIR/X86/dbgcall-site-two-fwd-reg-defs.mir<br>
index ac97da66a397..c1bdbd0783ac 100644<br>
--- a/llvm/test/DebugInfo/MIR/X86/dbgcall-site-two-fwd-reg-defs.mir<br>
+++ b/llvm/test/DebugInfo/MIR/X86/dbgcall-site-two-fwd-reg-defs.mir<br>
@@ -1,4 +1,4 @@<br>
-# RUN: llc -O1 -emit-call-site-info -debug-entry-values -start-after=livedebugvalues -filetype=obj %s -o - | llvm-dwarfdump - | FileCheck %s<br>
+# RUN: llc -O1 -emit-call-site-info -start-after=livedebugvalues -filetype=obj %s -o - | llvm-dwarfdump - | FileCheck %s<br>
<br>
 # Based on the following C reproducer:<br>
 #<br>
<br>
diff  --git a/llvm/test/DebugInfo/MIR/X86/dbginfo-entryvals.mir b/llvm/test/DebugInfo/MIR/X86/dbginfo-entryvals.mir<br>
index 9346b513cf48..302cce20a15a 100644<br>
--- a/llvm/test/DebugInfo/MIR/X86/dbginfo-entryvals.mir<br>
+++ b/llvm/test/DebugInfo/MIR/X86/dbginfo-entryvals.mir<br>
@@ -1,4 +1,4 @@<br>
-# RUN: llc -emit-call-site-info -debug-entry-values -run-pass=livedebugvalues -verify-machineinstrs -march=x86-64 -o - %s | FileCheck %s<br>
+# RUN: llc -run-pass=livedebugvalues -verify-machineinstrs -march=x86-64 -o - %s | FileCheck %s<br>
 #<br>
 #extern void fn2(int);<br>
 #<br>
<br>
diff  --git a/llvm/test/DebugInfo/MIR/X86/debug-call-site-param.mir b/llvm/test/DebugInfo/MIR/X86/debug-call-site-param.mir<br>
index 2a78919afd43..c5ca4f1b2a14 100644<br>
--- a/llvm/test/DebugInfo/MIR/X86/debug-call-site-param.mir<br>
+++ b/llvm/test/DebugInfo/MIR/X86/debug-call-site-param.mir<br>
@@ -2,8 +2,8 @@<br>
 # When the debugger tuning is set to gdb, use GNU opcodes.<br>
 # For lldb, use the standard DWARF5 opcodes.<br>
<br>
-# RUN: llc -emit-call-site-info -debug-entry-values -debugger-tune=gdb -filetype=obj -mtriple=x86_64-unknown-unknown -start-after=machineverifier -o - %s | llvm-dwarfdump - | FileCheck %s -check-prefixes=CHECK-GNU<br>
-# RUN: llc -emit-call-site-info -debug-entry-values -debugger-tune=lldb -filetype=obj -mtriple=x86_64-unknown-unknown -start-after=machineverifier -o - %s | llvm-dwarfdump - | FileCheck %s -check-prefixes=CHECK-DWARF5<br>
+# RUN: llc -emit-call-site-info -debugger-tune=gdb -filetype=obj -mtriple=x86_64-unknown-unknown -start-after=machineverifier -o - %s | llvm-dwarfdump - | FileCheck %s -check-prefixes=CHECK-GNU<br>
+# RUN: llc -emit-call-site-info -debugger-tune=lldb -filetype=obj -mtriple=x86_64-unknown-unknown -start-after=machineverifier -o - %s | llvm-dwarfdump - | FileCheck %s -check-prefixes=CHECK-DWARF5<br>
 #<br>
 # extern void foo(int *a, int b, int c, int d, int e, int f);<br>
 # extern int getVal();<br>
<br>
diff  --git a/llvm/test/DebugInfo/MIR/X86/entry-value-of-modified-param.mir b/llvm/test/DebugInfo/MIR/X86/entry-value-of-modified-param.mir<br>
index 541a2155578e..0dd63ae98009 100644<br>
--- a/llvm/test/DebugInfo/MIR/X86/entry-value-of-modified-param.mir<br>
+++ b/llvm/test/DebugInfo/MIR/X86/entry-value-of-modified-param.mir<br>
@@ -1,4 +1,4 @@<br>
-# RUN: llc -emit-call-site-info -debug-entry-values -run-pass=livedebugvalues -march=x86-64 -o - %s | FileCheck %s<br>
+# RUN: llc -run-pass=livedebugvalues -march=x86-64 -o - %s | FileCheck %s<br>
 #<br>
 #extern void fn1 (int, int, int);<br>
 #<br>
@@ -85,11 +85,6 @@<br>
 ---<br>
 name:            fn2<br>
 alignment:       16<br>
-callSites:<br>
-  - { bb: 0, offset: 14, fwdArgRegs:<br>
-      - { arg: 0, reg: '$edi' }<br>
-      - { arg: 1, reg: '$esi' }<br>
-      - { arg: 2, reg: '$edx' } }<br>
 body:             |<br>
   bb.0.entry:<br>
     liveins: $edi, $esi, $rbx<br>
<br>
diff  --git a/llvm/test/DebugInfo/MIR/X86/entry-values-diamond-bbs.mir b/llvm/test/DebugInfo/MIR/X86/entry-values-diamond-bbs.mir<br>
index 042d76058a22..fc7bd93d0223 100644<br>
--- a/llvm/test/DebugInfo/MIR/X86/entry-values-diamond-bbs.mir<br>
+++ b/llvm/test/DebugInfo/MIR/X86/entry-values-diamond-bbs.mir<br>
@@ -1,4 +1,4 @@<br>
-# RUN: llc -emit-call-site-info -debug-entry-values -run-pass=livedebugvalues -march=x86-64 -o - %s | FileCheck %s<br>
+# RUN: llc -run-pass=livedebugvalues -march=x86-64 -o - %s | FileCheck %s<br>
 #<br>
 # The test case was artificially adjusted, in order to make proper diamond basic<br>
 # block structure relevant to the debug entry values propagation.<br>
<br>
diff  --git a/llvm/test/DebugInfo/MIR/X86/propagate-entry-value-cross-bbs.mir b/llvm/test/DebugInfo/MIR/X86/propagate-entry-value-cross-bbs.mir<br>
index c5af863954bf..34f80f5ca2a3 100644<br>
--- a/llvm/test/DebugInfo/MIR/X86/propagate-entry-value-cross-bbs.mir<br>
+++ b/llvm/test/DebugInfo/MIR/X86/propagate-entry-value-cross-bbs.mir<br>
@@ -1,4 +1,4 @@<br>
-# RUN: llc -emit-call-site-info -debug-entry-values -run-pass=livedebugvalues -march=x86-64 -o - %s | FileCheck %s<br>
+# RUN: llc -run-pass=livedebugvalues -march=x86-64 -o - %s | FileCheck %s<br>
 #<br>
 #extern void fn1 (int, int, int);<br>
 #__attribute__((noinline))<br>
@@ -110,15 +110,6 @@<br>
 ---<br>
 name:            fn2<br>
 alignment:       16<br>
-callSites:<br>
-  - { bb: 0, offset: 20, fwdArgRegs:<br>
-      - { arg: 0, reg: '$edi' }<br>
-      - { arg: 1, reg: '$esi' }<br>
-      - { arg: 2, reg: '$edx' } }<br>
-  - { bb: 3, offset: 2, fwdArgRegs:<br>
-      - { arg: 0, reg: '$edi' }<br>
-      - { arg: 1, reg: '$esi' }<br>
-      - { arg: 2, reg: '$edx' } }<br>
 body:             |<br>
   bb.0.entry:<br>
     successors: %bb.1(0x40000000), %bb.2(0x40000000)<br>
<br>
diff  --git a/llvm/test/DebugInfo/MIR/X86/unreachable-block-call-site.mir b/llvm/test/DebugInfo/MIR/X86/unreachable-block-call-site.mir<br>
index ea9c12b5a192..bfc5c2be127e 100644<br>
--- a/llvm/test/DebugInfo/MIR/X86/unreachable-block-call-site.mir<br>
+++ b/llvm/test/DebugInfo/MIR/X86/unreachable-block-call-site.mir<br>
@@ -1,4 +1,4 @@<br>
-# RUN: llc -mtriple=x86_64-pc-linux -emit-call-site-info -debug-entry-values -run-pass=unreachable-mbb-elimination -o - %s | FileCheck %s<br>
+# RUN: llc -emit-call-site-info -mtriple=x86_64-pc-linux -run-pass=unreachable-mbb-elimination -o - %s | FileCheck %s<br>
<br>
 # Verify that the call site information for the call residing in the eliminated<br>
 # block is removed. This test case would previously trigger an assertion when<br>
<br>
diff  --git a/llvm/test/DebugInfo/X86/dbg-value-range.ll b/llvm/test/DebugInfo/X86/dbg-value-range.ll<br>
index e0cfe5f15ee9..9159d2aac780 100644<br>
--- a/llvm/test/DebugInfo/X86/dbg-value-range.ll<br>
+++ b/llvm/test/DebugInfo/X86/dbg-value-range.ll<br>
@@ -56,6 +56,6 @@ declare void @llvm.dbg.value(metadata, metadata, metadata) nounwind readnone<br>
 ;CHECK-NEXT:   .quad   [[CLOBBER_OFF]]<br>
 ;CHECK-NEXT:  .short 1 ## Loc expr size<br>
 ;CHECK-NEXT:   .byte   85 ## DW_OP_reg<br>
-;CHECK-NEXT:   .quad   0<br>
+;CHECK:        .quad  0<br>
 ;CHECK-NEXT:   .quad   0<br>
 !24 = !{i32 1, !"Debug Info Version", i32 3}<br>
<br>
diff  --git a/llvm/test/DebugInfo/X86/dbg-value-regmask-clobber.ll b/llvm/test/DebugInfo/X86/dbg-value-regmask-clobber.ll<br>
index 440498a9d8dd..425a6cb38c41 100644<br>
--- a/llvm/test/DebugInfo/X86/dbg-value-regmask-clobber.ll<br>
+++ b/llvm/test/DebugInfo/X86/dbg-value-regmask-clobber.ll<br>
@@ -9,8 +9,7 @@<br>
 ; ASM: movl $1, x(%rip)<br>
 ; ASM: callq clobber<br>
 ; ASM-NEXT: [[argc_range_end:.Ltmp[0-9]+]]:<br>
-; Previously LiveDebugValues would claim argc was still in ecx after the call.<br>
-; ASM-NOT: #DEBUG_VALUE: main:argc<br>
+; ASM: #DEBUG_VALUE: main:argc <- [DW_OP_LLVM_entry_value 1] $ecx<br>
<br>
 ; argc is the first debug location.<br>
 ; ASM: .Ldebug_loc1:<br>
@@ -23,7 +22,8 @@<br>
 ; DWARF: .debug_info contents:<br>
 ; DWARF:  DW_TAG_formal_parameter<br>
 ; DWARF-NEXT:    DW_AT_location ({{0x.*}}<br>
-; DWARF-NEXT:      [0x0000000000000000, 0x0000000000000013): DW_OP_reg2 RCX)<br>
+; DWARF-NEXT:    [0x0000000000000000, 0x0000000000000013): DW_OP_reg2 RCX<br>
+; DWARF-NEXT:    [0x0000000000000013, 0x0000000000000043): DW_OP_GNU_entry_value(DW_OP_reg2 RCX), DW_OP_stack_value<br>
 ; DWARF-NEXT:    DW_AT_name ("argc")<br>
<br>
 ; ModuleID = 't.cpp'<br>
<br>
diff  --git a/llvm/test/DebugInfo/X86/dbgcall-site-64-bit-imms.ll b/llvm/test/DebugInfo/X86/dbgcall-site-64-bit-imms.ll<br>
index b8cd9574cc63..f12dfa6196c1 100644<br>
--- a/llvm/test/DebugInfo/X86/dbgcall-site-64-bit-imms.ll<br>
+++ b/llvm/test/DebugInfo/X86/dbgcall-site-64-bit-imms.ll<br>
@@ -1,4 +1,4 @@<br>
-; RUN: llc -O1 -emit-call-site-info -debug-entry-values -filetype=obj -o - %s | llvm-dwarfdump - | FileCheck %s<br>
+; RUN: llc -emit-call-site-info -O1 -filetype=obj -o - %s | llvm-dwarfdump - | FileCheck %s<br>
<br>
 ; Verify that the 64-bit call site immediates are not truncated.<br>
 ;<br>
<br>
diff  --git a/llvm/test/DebugInfo/X86/dbgcall-site-zero-valued-imms.ll b/llvm/test/DebugInfo/X86/dbgcall-site-zero-valued-imms.ll<br>
index 5d37774f55d6..dc8c418117c7 100644<br>
--- a/llvm/test/DebugInfo/X86/dbgcall-site-zero-valued-imms.ll<br>
+++ b/llvm/test/DebugInfo/X86/dbgcall-site-zero-valued-imms.ll<br>
@@ -1,4 +1,4 @@<br>
-; RUN: llc -O3 -emit-call-site-info -debug-entry-values -filetype=obj -o - %s | llvm-dwarfdump - | FileCheck %s<br>
+; RUN: llc -emit-call-site-info -O3 -filetype=obj -o - %s | llvm-dwarfdump - | FileCheck %s<br>
<br>
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"<br>
 target triple = "x86_64-unknown-linux-gnu"<br>
<br>
diff  --git a/llvm/test/DebugInfo/X86/loclists-dwp.ll b/llvm/test/DebugInfo/X86/loclists-dwp.ll<br>
index 91f838876338..a972c8094c5f 100644<br>
--- a/llvm/test/DebugInfo/X86/loclists-dwp.ll<br>
+++ b/llvm/test/DebugInfo/X86/loclists-dwp.ll<br>
@@ -19,10 +19,12 @@<br>
 ; void b(int i) { asm("" : : : "rdi"); }<br>
<br>
 ; CHECK:      DW_AT_location [DW_FORM_sec_offset]   (0x00000000<br>
-; CHECK-NEXT: DW_LLE_startx_length (0x0000000000000000, 0x0000000000000006): DW_OP_reg5 RDI)<br>
+; CHECK-NEXT: DW_LLE_startx_length (0x0000000000000000, 0x0000000000000006): DW_OP_reg5 RDI<br>
+; CHECK-NEXT: DW_LLE_startx_length (0x0000000000000001, 0x0000000000000002): DW_OP_GNU_entry_value(DW_OP_reg5 RDI), DW_OP_stack_value)<br>
<br>
 ; CHECK:      DW_AT_location [DW_FORM_sec_offset]   (0x00000000<br>
-; CHECK-NEXT: DW_LLE_startx_length (0x0000000000000000, 0x0000000000000000): DW_OP_reg5 RDI)<br>
+; CHECK-NEXT: DW_LLE_startx_length (0x0000000000000000, 0x0000000000000000): DW_OP_reg5 RDI<br>
+; CHECK-NEXT: DW_LLE_startx_length (0x0000000000000001, 0x0000000000000001): DW_OP_GNU_entry_value(DW_OP_reg5 RDI), DW_OP_stack_value)<br>
<br>
 target triple = "x86_64-unknown-linux-gnu"<br>
<br>
<br>
diff  --git a/llvm/test/DebugInfo/X86/no-entry-values-with-O0.ll b/llvm/test/DebugInfo/X86/no-entry-values-with-O0.ll<br>
new file mode 100644<br>
index 000000000000..8ba22b7b6e51<br>
--- /dev/null<br>
+++ b/llvm/test/DebugInfo/X86/no-entry-values-with-O0.ll<br>
@@ -0,0 +1,88 @@<br>
+; RUN: llc -O0  -dwarf-version=5 -debugger-tune=lldb -march=x86-64 -filetype=obj < %s \<br>
+; RUN:  | llvm-dwarfdump - | FileCheck --implicit-check-not=DW_OP_entry_value %s<br>
+; RUN: llc -O0  -dwarf-version=5 -debugger-tune=gdb -march=x86-64 -filetype=obj < %s \<br>
+; RUN:  | llvm-dwarfdump - | FileCheck --implicit-check-not=DW_OP_entry_value %s<br>
+<br>
+; The call-site-params are created iff corresponding DISubprogram contains<br>
+; the AllCallsDescribed DIFlag.<br>
+; CHECK-NOT: DW_TAG_call_site_param<br>
+<br>
+; Genarated with:<br>
+; clang -gdwarf-5 -O0 test.c -S -emit-llvm<br>
+;<br>
+; ModuleID = 'test.c'<br>
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"<br>
+target triple = "x86_64-unknown-linux-gnu"<br>
+<br>
+; Function Attrs: noinline nounwind optnone uwtable<br>
+define dso_local void @fn1(i32 %x, i32 %y) !dbg !7 {<br>
+entry:<br>
+  %x.addr = alloca i32, align 4<br>
+  %y.addr = alloca i32, align 4<br>
+  %u = alloca i32, align 4<br>
+  %a = alloca i32, align 4<br>
+  store i32 %x, i32* %x.addr, align 4<br>
+  call void @llvm.dbg.declare(metadata i32* %x.addr, metadata !11, metadata !DIExpression()), !dbg !12<br>
+  store i32 %y, i32* %y.addr, align 4<br>
+  call void @llvm.dbg.declare(metadata i32* %y.addr, metadata !13, metadata !DIExpression()), !dbg !14<br>
+  call void @llvm.dbg.declare(metadata i32* %u, metadata !15, metadata !DIExpression()), !dbg !16<br>
+  %0 = load i32, i32* %x.addr, align 4, !dbg !16<br>
+  %1 = load i32, i32* %y.addr, align 4, !dbg !16<br>
+  %add = add nsw i32 %0, %1, !dbg !16<br>
+  store i32 %add, i32* %u, align 4, !dbg !16<br>
+  %2 = load i32, i32* %x.addr, align 4, !dbg !17<br>
+  %cmp = icmp sgt i32 %2, 1, !dbg !17<br>
+  br i1 %cmp, label %if.then, label %if.else, !dbg !16<br>
+<br>
+if.then:                                          ; preds = %entry<br>
+  %3 = load i32, i32* %u, align 4, !dbg !17<br>
+  %add1 = add nsw i32 %3, 1, !dbg !17<br>
+  store i32 %add1, i32* %u, align 4, !dbg !17<br>
+  br label %if.end, !dbg !17<br>
+<br>
+if.else:                                          ; preds = %entry<br>
+  %4 = load i32, i32* %u, align 4, !dbg !17<br>
+  %add2 = add nsw i32 %4, 2, !dbg !17<br>
+  store i32 %add2, i32* %u, align 4, !dbg !17<br>
+  br label %if.end<br>
+<br>
+if.end:                                           ; preds = %if.else, %if.then<br>
+  call void @llvm.dbg.declare(metadata i32* %a, metadata !19, metadata !DIExpression()), !dbg !16<br>
+  store i32 7, i32* %a, align 4, !dbg !16<br>
+  %5 = load i32, i32* %a, align 4, !dbg !16<br>
+  call void @fn2(i32 %5), !dbg !16<br>
+  %6 = load i32, i32* %u, align 4, !dbg !16<br>
+  %dec = add nsw i32 %6, -1, !dbg !16<br>
+  store i32 %dec, i32* %u, align 4, !dbg !16<br>
+  ret void, !dbg !16<br>
+}<br>
+<br>
+; Function Attrs: nounwind readnone speculatable willreturn<br>
+declare void @llvm.dbg.declare(metadata, metadata, metadata)<br>
+<br>
+declare dso_local void @fn2(i32)<br>
+<br>
+!<a href="http://llvm.dbg.cu" rel="noreferrer" target="_blank">llvm.dbg.cu</a> = !{!0}<br>
+!llvm.module.flags = !{!3, !4, !5}<br>
+!llvm.ident = !{!6}<br>
+<br>
+!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 11.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None)<br>
+!1 = !DIFile(filename: "test.c", directory: "/")<br>
+!2 = !{}<br>
+!3 = !{i32 7, !"Dwarf Version", i32 5}<br>
+!4 = !{i32 2, !"Debug Info Version", i32 3}<br>
+!5 = !{i32 1, !"wchar_size", i32 4}<br>
+!6 = !{!"clang version 11.0.0"}<br>
+!7 = distinct !DISubprogram(name: "fn1", scope: !1, file: !1, line: 5, type: !8, scopeLine: 5, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !2)<br>
+!8 = !DISubroutineType(types: !9)<br>
+!9 = !{null, !10, !10}<br>
+!10 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)<br>
+!11 = !DILocalVariable(name: "x", arg: 1, scope: !7, file: !1, line: 5, type: !10)<br>
+!12 = !DILocation(line: 5, column: 10, scope: !7)<br>
+!13 = !DILocalVariable(name: "y", arg: 2, scope: !7, file: !1, line: 5, type: !10)<br>
+!14 = !DILocation(line: 5, column: 17, scope: !7)<br>
+!15 = !DILocalVariable(name: "u", scope: !7, file: !1, line: 6, type: !10)<br>
+!16 = !DILocation(line: 6, column: 7, scope: !7)<br>
+!17 = !DILocation(line: 7, column: 7, scope: !18)<br>
+!18 = distinct !DILexicalBlock(scope: !7, file: !1, line: 7, column: 7)<br>
+!19 = !DILocalVariable(name: "a", scope: !7, file: !1, line: 11, type: !10)<br>
<br>
diff  --git a/llvm/test/tools/llvm-locstats/locstats.ll b/llvm/test/tools/llvm-locstats/locstats.ll<br>
index f16635d2e8e4..fd28679f3ec1 100644<br>
--- a/llvm/test/tools/llvm-locstats/locstats.ll<br>
+++ b/llvm/test/tools/llvm-locstats/locstats.ll<br>
@@ -9,9 +9,9 @@<br>
 ; LOCSTATS: [10%,20%) 0 0%<br>
 ; LOCSTATS: [20%,30%) 1 11%<br>
 ; LOCSTATS: [30%,40%) 0 0%<br>
-; LOCSTATS: [40%,50%) 1 11%<br>
-; LOCSTATS: [50%,60%) 1 11%<br>
-; LOCSTATS: [60%,70%) 1 11%<br>
+; LOCSTATS: [40%,50%) 0 0%<br>
+; LOCSTATS: [50%,60%) 0 0%<br>
+; LOCSTATS: [60%,70%) 3 33%<br>
 ; LOCSTATS: [70%,80%) 0 0%<br>
 ; LOCSTATS: [80%,90%) 2 22%<br>
 ; LOCSTATS: [90%,100%) 1 11%<br>
<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</blockquote></div>
</blockquote></div>