[clang] 2f215cf - Revert "Reland "[DebugInfo] Enable the debug entry values feature by default""

Djordje Todorovic via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 20 05:41:59 PST 2020


Author: Djordje Todorovic
Date: 2020-02-20T14:41:39+01:00
New Revision: 2f215cf36adced6bf1abda4bdbbc6422c1369353

URL: https://github.com/llvm/llvm-project/commit/2f215cf36adced6bf1abda4bdbbc6422c1369353
DIFF: https://github.com/llvm/llvm-project/commit/2f215cf36adced6bf1abda4bdbbc6422c1369353.diff

LOG: Revert "Reland "[DebugInfo] Enable the debug entry values feature by default""

This reverts commit rGfaff707db82d.
A failure found on an ARM 2-stage buildbot.
The investigation is needed.

Added: 
    

Modified: 
    clang/include/clang/Basic/CodeGenOptions.def
    clang/include/clang/Driver/CC1Options.td
    clang/lib/CodeGen/BackendUtil.cpp
    clang/lib/CodeGen/CGDebugInfo.cpp
    clang/lib/Frontend/CompilerInvocation.cpp
    clang/test/CodeGen/debug-info-extern-call.c
    clang/test/CodeGenCXX/dbg-info-all-calls-described.cpp
    lldb/packages/Python/lldbsuite/test/decorators.py
    lldb/test/API/functionalities/param_entry_vals/basic_entry_values_x86_64/Makefile
    llvm/include/llvm/CodeGen/CommandFlags.inc
    llvm/include/llvm/Target/TargetMachine.h
    llvm/include/llvm/Target/TargetOptions.h
    llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
    llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
    llvm/lib/CodeGen/LiveDebugValues.cpp
    llvm/lib/CodeGen/MIRParser/MIRParser.cpp
    llvm/lib/CodeGen/MachineFunction.cpp
    llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
    llvm/lib/CodeGen/TargetOptionsImpl.cpp
    llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
    llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
    llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
    llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
    llvm/lib/Target/ARM/ARMISelLowering.cpp
    llvm/lib/Target/ARM/ARMTargetMachine.cpp
    llvm/lib/Target/X86/X86ISelLowering.cpp
    llvm/lib/Target/X86/X86TargetMachine.cpp
    llvm/test/CodeGen/AArch64/arm64-anyregcc.ll
    llvm/test/CodeGen/AArch64/arm64-patchpoint.ll
    llvm/test/CodeGen/AArch64/arm64-tls-dynamics.ll
    llvm/test/CodeGen/ARM/smml.ll
    llvm/test/CodeGen/MIR/Hexagon/bundled-call-site-info.mir
    llvm/test/CodeGen/MIR/X86/call-site-info-error1.mir
    llvm/test/CodeGen/MIR/X86/call-site-info-error2.mir
    llvm/test/CodeGen/MIR/X86/call-site-info-error3.mir
    llvm/test/CodeGen/MIR/X86/call-site-info-error4.mir
    llvm/test/CodeGen/X86/call-site-info-output.ll
    llvm/test/CodeGen/X86/hoist-invariant-load.ll
    llvm/test/CodeGen/X86/speculative-load-hardening-indirect.ll
    llvm/test/CodeGen/X86/statepoint-allocas.ll
    llvm/test/CodeGen/X86/tail-dup-repeat.ll
    llvm/test/CodeGen/X86/xray-custom-log.ll
    llvm/test/CodeGen/X86/xray-typed-event-log.ll
    llvm/test/DebugInfo/AArch64/call-site-info-output.ll
    llvm/test/DebugInfo/ARM/call-site-info-output.ll
    llvm/test/DebugInfo/ARM/entry-value-multi-byte-expr.ll
    llvm/test/DebugInfo/MIR/AArch64/dbgcall-site-interpret-movzxi.mir
    llvm/test/DebugInfo/MIR/AArch64/dbgcall-site-interpretation.mir
    llvm/test/DebugInfo/MIR/AArch64/dbgcall-site-orr-moves.mir
    llvm/test/DebugInfo/MIR/ARM/dbgcall-site-interpretation.mir
    llvm/test/DebugInfo/MIR/ARM/dbgcall-site-propagated-value.mir
    llvm/test/DebugInfo/MIR/ARM/if-coverter-call-site-info.mir
    llvm/test/DebugInfo/MIR/Hexagon/dbgcall-site-instr-before-bundled-call.mir
    llvm/test/DebugInfo/MIR/Hexagon/live-debug-values-bundled-entry-values.mir
    llvm/test/DebugInfo/MIR/SystemZ/call-site-lzer.mir
    llvm/test/DebugInfo/MIR/X86/DW_OP_entry_value.mir
    llvm/test/DebugInfo/MIR/X86/call-site-gnu-vs-dwarf5-attrs.mir
    llvm/test/DebugInfo/MIR/X86/dbg-call-site-spilled-arg-multiple-defs.mir
    llvm/test/DebugInfo/MIR/X86/dbg-call-site-spilled-arg.mir
    llvm/test/DebugInfo/MIR/X86/dbgcall-site-copy-super-sub.mir
    llvm/test/DebugInfo/MIR/X86/dbgcall-site-interpretation.mir
    llvm/test/DebugInfo/MIR/X86/dbgcall-site-lea-interpretation.mir
    llvm/test/DebugInfo/MIR/X86/dbgcall-site-partial-describe.mir
    llvm/test/DebugInfo/MIR/X86/dbgcall-site-reference.mir
    llvm/test/DebugInfo/MIR/X86/dbgcall-site-reg-shuffle.mir
    llvm/test/DebugInfo/MIR/X86/dbgcall-site-two-fwd-reg-defs.mir
    llvm/test/DebugInfo/MIR/X86/dbginfo-entryvals.mir
    llvm/test/DebugInfo/MIR/X86/debug-call-site-param.mir
    llvm/test/DebugInfo/MIR/X86/entry-value-of-modified-param.mir
    llvm/test/DebugInfo/MIR/X86/entry-values-diamond-bbs.mir
    llvm/test/DebugInfo/MIR/X86/kill-entry-value-after-diamond-bbs.mir
    llvm/test/DebugInfo/MIR/X86/multiple-param-dbg-value-entry.mir
    llvm/test/DebugInfo/MIR/X86/propagate-entry-value-cross-bbs.mir
    llvm/test/DebugInfo/MIR/X86/unreachable-block-call-site.mir
    llvm/test/DebugInfo/Sparc/entry-value-complex-reg-expr.ll
    llvm/test/DebugInfo/X86/dbg-value-range.ll
    llvm/test/DebugInfo/X86/dbg-value-regmask-clobber.ll
    llvm/test/DebugInfo/X86/dbgcall-site-64-bit-imms.ll
    llvm/test/DebugInfo/X86/dbgcall-site-zero-valued-imms.ll
    llvm/test/DebugInfo/X86/loclists-dwp.ll
    llvm/test/tools/llvm-dwarfdump/X86/locstats.ll
    llvm/test/tools/llvm-dwarfdump/X86/stats-dbg-callsite-info.ll
    llvm/test/tools/llvm-dwarfdump/X86/valid-call-site-GNU-extensions.ll
    llvm/test/tools/llvm-locstats/locstats.ll

Removed: 
    llvm/test/DebugInfo/MIR/ARM/dbgcallsite-noreg-is-imm-check.mir
    llvm/test/DebugInfo/X86/no-entry-values-with-O0.ll


################################################################################
diff  --git a/clang/include/clang/Basic/CodeGenOptions.def b/clang/include/clang/Basic/CodeGenOptions.def
index fa450724ddd4..48c0df49e32d 100644
--- a/clang/include/clang/Basic/CodeGenOptions.def
+++ b/clang/include/clang/Basic/CodeGenOptions.def
@@ -63,6 +63,7 @@ CODEGENOPT(ExperimentalNewPassManager, 1, 0) ///< Enables the new, experimental
 CODEGENOPT(DebugPassManager, 1, 0) ///< Prints debug information for the new
                                    ///< pass manager.
 CODEGENOPT(DisableRedZone    , 1, 0) ///< Set when -mno-red-zone is enabled.
+CODEGENOPT(EnableDebugEntryValues, 1, 0) ///< Emit call site parameter dbg info
 CODEGENOPT(IndirectTlsSegRefs, 1, 0) ///< Set when -mno-tls-direct-seg-refs
                                      ///< is specified.
 CODEGENOPT(DisableTailCalls  , 1, 0) ///< Do not emit tail calls.

diff  --git a/clang/include/clang/Driver/CC1Options.td b/clang/include/clang/Driver/CC1Options.td
index 8dcf28e34810..733a1080be52 100644
--- a/clang/include/clang/Driver/CC1Options.td
+++ b/clang/include/clang/Driver/CC1Options.td
@@ -390,6 +390,8 @@ def flto_visibility_public_std:
 def flto_unit: Flag<["-"], "flto-unit">,
     HelpText<"Emit IR to support LTO unit features (CFI, whole program vtable opt)">;
 def fno_lto_unit: Flag<["-"], "fno-lto-unit">;
+def femit_debug_entry_values : Flag<["-"], "femit-debug-entry-values">,
+    HelpText<"Enables debug info about call site parameter's entry values">;
 def fdebug_pass_manager : Flag<["-"], "fdebug-pass-manager">,
     HelpText<"Prints debug information for the new pass manager">;
 def fno_debug_pass_manager : Flag<["-"], "fno-debug-pass-manager">,

diff  --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp
index 4897e4037e18..b244fd499fb0 100644
--- a/clang/lib/CodeGen/BackendUtil.cpp
+++ b/clang/lib/CodeGen/BackendUtil.cpp
@@ -485,6 +485,7 @@ static void initTargetOptions(llvm::TargetOptions &Options,
   Options.DebuggerTuning = CodeGenOpts.getDebuggerTuning();
   Options.EmitStackSizeSection = CodeGenOpts.StackSizeSection;
   Options.EmitAddrsig = CodeGenOpts.Addrsig;
+  Options.EnableDebugEntryValues = CodeGenOpts.EnableDebugEntryValues;
   Options.ForceDwarfFrameSection = CodeGenOpts.ForceDwarfFrameSection;
 
   Options.MCOptions.SplitDwarfFile = CodeGenOpts.SplitDwarfFile;

diff  --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index f706ffb92a0e..e171082942f6 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -4861,7 +4861,8 @@ llvm::DINode::DIFlags CGDebugInfo::getCallSiteRelatedAttrs() const {
       (CGM.getCodeGenOpts().getDebuggerTuning() == llvm::DebuggerKind::LLDB ||
        CGM.getCodeGenOpts().getDebuggerTuning() == llvm::DebuggerKind::GDB);
 
-  if (!SupportsDWARFv4Ext && CGM.getCodeGenOpts().DwarfVersion < 5)
+  if (!SupportsDWARFv4Ext && CGM.getCodeGenOpts().DwarfVersion < 5 &&
+      !CGM.getCodeGenOpts().EnableDebugEntryValues)
     return llvm::DINode::FlagZero;
 
   return llvm::DINode::FlagAllCallsDescribed;

diff  --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 2a7ec58b2141..ecbdf0376bc2 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -792,6 +792,16 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
 
   Opts.DisableLLVMPasses = Args.hasArg(OPT_disable_llvm_passes);
   Opts.DisableLifetimeMarkers = Args.hasArg(OPT_disable_lifetimemarkers);
+
+  const llvm::Triple::ArchType DebugEntryValueArchs[] = {
+      llvm::Triple::x86, llvm::Triple::x86_64, llvm::Triple::aarch64,
+      llvm::Triple::arm, llvm::Triple::armeb};
+
+  llvm::Triple T(TargetOpts.Triple);
+  if (Opts.OptimizationLevel > 0 && Opts.hasReducedDebugInfo() &&
+      llvm::is_contained(DebugEntryValueArchs, T.getArch()))
+    Opts.EnableDebugEntryValues = Args.hasArg(OPT_femit_debug_entry_values);
+
   Opts.DisableO0ImplyOptNone = Args.hasArg(OPT_disable_O0_optnone);
   Opts.DisableRedZone = Args.hasArg(OPT_disable_red_zone);
   Opts.IndirectTlsSegRefs = Args.hasArg(OPT_mno_tls_direct_seg_refs);

diff  --git a/clang/test/CodeGen/debug-info-extern-call.c b/clang/test/CodeGen/debug-info-extern-call.c
index 072e578b5898..da3764f7359e 100644
--- a/clang/test/CodeGen/debug-info-extern-call.c
+++ b/clang/test/CodeGen/debug-info-extern-call.c
@@ -1,7 +1,7 @@
 // When entry values are emitted, expect a subprogram for extern decls so that
 // the dwarf generator can describe call site parameters at extern call sites.
 //
-// RUN: %clang -g -O2 -target x86_64-none-linux-gnu -S -emit-llvm %s -o - \
+// RUN: %clang -Xclang -femit-debug-entry-values -g -O2 -target x86_64-none-linux-gnu -S -emit-llvm %s -o - \
 // RUN:   | FileCheck %s -check-prefix=DECLS-FOR-EXTERN
 
 // Similarly, when the debugger tuning is gdb, expect a subprogram for extern

diff  --git a/clang/test/CodeGenCXX/dbg-info-all-calls-described.cpp b/clang/test/CodeGenCXX/dbg-info-all-calls-described.cpp
index 540ef02c908a..667c2469b55e 100644
--- a/clang/test/CodeGenCXX/dbg-info-all-calls-described.cpp
+++ b/clang/test/CodeGenCXX/dbg-info-all-calls-described.cpp
@@ -15,22 +15,22 @@
 // RUN: | FileCheck %s -check-prefix=HAS-ATTR \
 // RUN:     -implicit-check-not=DISubprogram -implicit-check-not=DIFlagAllCallsDescribed
 
-// Supported: DWARF4 + GDB tuning, -O1
-// RUN: %clang_cc1 -emit-llvm -triple x86_64-linux-gnu \
+// Supported: DWARF4 + GDB tuning by using '-femit-debug-entry-values'
+// RUN: %clang_cc1 -femit-debug-entry-values -emit-llvm -triple x86_64-linux-gnu \
 // RUN:   %s -o - -O1 -disable-llvm-passes -debugger-tuning=gdb \
 // RUN:   -debug-info-kind=standalone -dwarf-version=4 \
 // RUN: | FileCheck %s -check-prefix=HAS-ATTR \
 // RUN:     -implicit-check-not=DIFlagAllCallsDescribed
 
-// Supported: DWARF4 + LLDB tuning, -O1
-// RUN: %clang_cc1 -emit-llvm -triple x86_64-linux-gnu \
+// Supported: DWARF4 + LLDB tuning by using '-femit-debug-entry-values'
+// RUN: %clang_cc1 -femit-debug-entry-values -emit-llvm -triple x86_64-linux-gnu \
 // RUN:   %s -o - -O1 -disable-llvm-passes -debugger-tuning=lldb \
 // RUN:   -debug-info-kind=standalone -dwarf-version=4 \
 // RUN: | FileCheck %s -check-prefix=HAS-ATTR \
 // RUN:     -implicit-check-not=DIFlagAllCallsDescribed
 
-// Unsupported: -O0
-// RUN: %clang_cc1 -emit-llvm -triple x86_64-linux-gnu \
+// Unsupported: -O0 + '-femit-debug-entry-values'
+// RUN: %clang_cc1 -femit-debug-entry-values -emit-llvm -triple x86_64-linux-gnu \
 // RUN:   %s -o - -O0 -disable-llvm-passes -debugger-tuning=gdb \
 // RUN:   -debug-info-kind=standalone -dwarf-version=4 \
 // RUN: | FileCheck %s -check-prefix=NO-ATTR

diff  --git a/lldb/packages/Python/lldbsuite/test/decorators.py b/lldb/packages/Python/lldbsuite/test/decorators.py
index 39cda3a81954..ec17cb7c2569 100644
--- a/lldb/packages/Python/lldbsuite/test/decorators.py
+++ b/lldb/packages/Python/lldbsuite/test/decorators.py
@@ -694,7 +694,7 @@ def is_compiler_clang_with_call_site_info(self):
 
         f = tempfile.NamedTemporaryFile()
         cmd = "echo 'int main() {}' | " \
-              "%s -g -glldb -O1 -S -emit-llvm -x c -o %s -" % (compiler_path, f.name)
+              "%s -g -glldb -O1 -Xclang -femit-debug-entry-values -S -emit-llvm -x c -o %s -" % (compiler_path, f.name)
         if os.popen(cmd).close() is not None:
             return "Compiler can't compile with call site info enabled"
 

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
index ab505a684126..db8fa57abb91 100644
--- 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
@@ -1,3 +1,3 @@
 CXX_SOURCES := main.cpp
-CXXFLAGS_EXTRAS := -O2 -glldb
+CXXFLAGS_EXTRAS := -O2 -glldb -Xclang -femit-debug-entry-values
 include Makefile.rules

diff  --git a/llvm/include/llvm/CodeGen/CommandFlags.inc b/llvm/include/llvm/CodeGen/CommandFlags.inc
index 8b676655d2d3..e12293461759 100644
--- a/llvm/include/llvm/CodeGen/CommandFlags.inc
+++ b/llvm/include/llvm/CodeGen/CommandFlags.inc
@@ -277,7 +277,7 @@ static cl::opt<bool>
 
 static cl::opt<bool>
     EnableDebugEntryValues("debug-entry-values",
-                           cl::desc("Enable debug info for the debug entry values"),
+                           cl::desc("Emit debug info about parameter's entry values"),
                            cl::init(false));
 
 static cl::opt<bool>

diff  --git a/llvm/include/llvm/Target/TargetMachine.h b/llvm/include/llvm/Target/TargetMachine.h
index 2c52bd13bd87..67afbee4681f 100644
--- a/llvm/include/llvm/Target/TargetMachine.h
+++ b/llvm/include/llvm/Target/TargetMachine.h
@@ -237,9 +237,6 @@ class TargetMachine {
   void setSupportsDefaultOutlining(bool Enable) {
     Options.SupportsDefaultOutlining = Enable;
   }
-  void setSupportsDebugEntryValues(bool Enable) {
-    Options.SupportsDebugEntryValues = Enable;
-  }
 
   bool shouldPrintMachineCode() const { return Options.PrintMachineCode; }
 

diff  --git a/llvm/include/llvm/Target/TargetOptions.h b/llvm/include/llvm/Target/TargetOptions.h
index 535909cc77c3..84c6ee2a6387 100644
--- a/llvm/include/llvm/Target/TargetOptions.h
+++ b/llvm/include/llvm/Target/TargetOptions.h
@@ -119,8 +119,7 @@ namespace llvm {
           ExplicitEmulatedTLS(false), EnableIPRA(false),
           EmitStackSizeSection(false), EnableMachineOutliner(false),
           SupportsDefaultOutlining(false), EmitAddrsig(false),
-          SupportsDebugEntryValues(false), EnableDebugEntryValues(false),
-          ForceDwarfFrameSection(false) {}
+          EnableDebugEntryValues(false), ForceDwarfFrameSection(false) {}
 
     /// PrintMachineCode - This flag is enabled when the -print-machineinstrs
     /// option is specified on the command line, and should enable debugging
@@ -257,18 +256,8 @@ namespace llvm {
     /// Emit address-significance table.
     unsigned EmitAddrsig : 1;
 
-    /// Set if the target supports the debug entry values by default.
-    unsigned SupportsDebugEntryValues : 1;
-    /// When set to true, the EnableDebugEntryValues option forces production
-    /// of debug entry values even if the target does not officially support
-    /// it. Useful for testing purposes only. This flag should never be checked
-    /// directly, always use \ref ShouldEmitDebugEntryValues instead.
+    /// Emit debug info about parameter's entry values.
     unsigned EnableDebugEntryValues : 1;
-    /// NOTE: There are targets that still do not support the call site info
-    /// production (the info about the arguments passed to the call, necessary
-    /// for the debug entry values), so we keep using the experimental option
-    /// (-debug-entry-values) to test them as well.
-    bool ShouldEmitDebugEntryValues() const;
 
     /// Emit DWARF debug frame section.
     unsigned ForceDwarfFrameSection : 1;

diff  --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index f7467c345c60..4e53edf7f02b 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -95,10 +95,6 @@ static cl::opt<bool> UseDwarfRangesBaseAddressSpecifier(
     "use-dwarf-ranges-base-address-specifier", cl::Hidden,
     cl::desc("Use base address specifiers in debug_ranges"), cl::init(false));
 
-static cl::opt<bool> EmitDwarfDebugEntryValues(
-    "emit-debug-entry-values", cl::Hidden,
-    cl::desc("Emit the debug entry values"), cl::init(false));
-
 static cl::opt<bool> GenerateARangeSection("generate-arange-section",
                                            cl::Hidden,
                                            cl::desc("Generate dwarf aranges"),
@@ -423,12 +419,6 @@ DwarfDebug::DwarfDebug(AsmPrinter *A, Module *M)
   // a monolithic string offsets table without any header.
   UseSegmentedStringOffsetsTable = DwarfVersion >= 5;
 
-  // Emit call-site-param debug info for GDB and LLDB, if the target supports
-  // the debug entry values feature. It can also be enabled explicitly.
-  EmitDebugEntryValues = (Asm->TM.Options.ShouldEmitDebugEntryValues() &&
-                          (tuneForGDB() || tuneForLLDB())) ||
-                         EmitDwarfDebugEntryValues;
-
   Asm->OutStreamer->getContext().setDwarfVersion(DwarfVersion);
 }
 
@@ -850,8 +840,9 @@ void DwarfDebug::constructCallSiteEntryDIEs(const DISubprogram &SP,
       DIE &CallSiteDIE = CU.constructCallSiteEntryDIE(ScopeDIE, CalleeDIE,
                                                       IsTail, PCAddr, CallReg);
 
-      // Optionally emit call-site-param debug info.
-      if (emitDebugEntryValues()) {
+      // GDB and LLDB support call site parameter debug info.
+      if (Asm->TM.Options.EnableDebugEntryValues &&
+          (tuneForGDB() || tuneForLLDB())) {
         ParamSet Params;
         // Try to interpret values of call site parameters.
         collectCallSiteParameters(&MI, Params);

diff  --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
index 882fc739d792..a44960589d89 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
@@ -386,11 +386,6 @@ class DwarfDebug : public DebugHandlerBase {
   /// a monolithic sequence of string offsets.
   bool UseSegmentedStringOffsetsTable;
 
-  /// Enable production of call site parameters needed to print the debug entry
-  /// values. Useful for testing purposes when a debugger does not support the
-  /// feature yet.
-  bool EmitDebugEntryValues;
-
   /// Separated Dwarf Variables
   /// In general these will all be for bits that are left in the
   /// original object file, rather than things that are meant
@@ -713,10 +708,6 @@ class DwarfDebug : public DebugHandlerBase {
     return UseSegmentedStringOffsetsTable;
   }
 
-  bool emitDebugEntryValues() const {
-    return EmitDebugEntryValues;
-  }
-
   bool shareAcrossDWOCUs() const;
 
   /// Returns the Dwarf Version.

diff  --git a/llvm/lib/CodeGen/LiveDebugValues.cpp b/llvm/lib/CodeGen/LiveDebugValues.cpp
index 23a63698a0f9..259604adb5c0 100644
--- a/llvm/lib/CodeGen/LiveDebugValues.cpp
+++ b/llvm/lib/CodeGen/LiveDebugValues.cpp
@@ -984,7 +984,7 @@ void LiveDebugValues::transferRegisterDef(
 
   if (auto *TPC = getAnalysisIfAvailable<TargetPassConfig>()) {
     auto &TM = TPC->getTM<TargetMachine>();
-    if (TM.Options.ShouldEmitDebugEntryValues())
+    if (TM.Options.EnableDebugEntryValues)
       emitEntryValues(MI, OpenRanges, VarLocIDs, Transfers, KillSet);
   }
 }
@@ -1484,7 +1484,7 @@ void LiveDebugValues::recordEntryValue(const MachineInstr &MI,
                                        VarLocMap &VarLocIDs) {
   if (auto *TPC = getAnalysisIfAvailable<TargetPassConfig>()) {
     auto &TM = TPC->getTM<TargetMachine>();
-    if (!TM.Options.ShouldEmitDebugEntryValues())
+    if (!TM.Options.EnableDebugEntryValues)
       return;
   }
 

diff  --git a/llvm/lib/CodeGen/MIRParser/MIRParser.cpp b/llvm/lib/CodeGen/MIRParser/MIRParser.cpp
index 69d14cf68eca..10157c746b46 100644
--- a/llvm/lib/CodeGen/MIRParser/MIRParser.cpp
+++ b/llvm/lib/CodeGen/MIRParser/MIRParser.cpp
@@ -381,11 +381,11 @@ bool MIRParserImpl::initializeCallSiteInfo(
       CSInfo.emplace_back(Reg, ArgRegPair.ArgNo);
     }
 
-    if (TM.Options.ShouldEmitDebugEntryValues())
+    if (TM.Options.EnableDebugEntryValues)
       MF.addCallArgsForwardingRegs(&*CallI, std::move(CSInfo));
   }
 
-  if (YamlMF.CallSitesInfo.size() && !TM.Options.ShouldEmitDebugEntryValues())
+  if (YamlMF.CallSitesInfo.size() && !TM.Options.EnableDebugEntryValues)
     return error(Twine("Call site info provided but not used"));
   return false;
 }

diff  --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp
index 2eb8d9460e05..06b5ab5b7f4c 100644
--- a/llvm/lib/CodeGen/MachineFunction.cpp
+++ b/llvm/lib/CodeGen/MachineFunction.cpp
@@ -865,7 +865,8 @@ MachineFunction::CallSiteInfoMap::iterator
 MachineFunction::getCallSiteInfo(const MachineInstr *MI) {
   assert(MI->isCandidateForCallSiteEntry() &&
          "Call site info refers only to call (MI) candidates");
-  if (!Target.Options.ShouldEmitDebugEntryValues())
+
+  if (!Target.Options.EnableDebugEntryValues)
     return CallSitesInfo.end();
   return CallSitesInfo.find(MI);
 }

diff  --git a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
index 532efa718c5a..7bded0005a51 100644
--- a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
@@ -867,7 +867,7 @@ EmitSchedule(MachineBasicBlock::iterator &InsertPos) {
     }
 
     if (MI->isCandidateForCallSiteEntry() &&
-        DAG->getTarget().Options.ShouldEmitDebugEntryValues())
+        DAG->getTarget().Options.EnableDebugEntryValues)
       MF.addCallArgsForwardingRegs(MI, DAG->getSDCallSiteInfo(Node));
 
     return MI;

diff  --git a/llvm/lib/CodeGen/TargetOptionsImpl.cpp b/llvm/lib/CodeGen/TargetOptionsImpl.cpp
index 3db0f2f2829a..d794a261ecb2 100644
--- a/llvm/lib/CodeGen/TargetOptionsImpl.cpp
+++ b/llvm/lib/CodeGen/TargetOptionsImpl.cpp
@@ -45,11 +45,3 @@ bool TargetOptions::DisableFramePointerElim(const MachineFunction &MF) const {
 bool TargetOptions::HonorSignDependentRoundingFPMath() const {
   return !UnsafeFPMath && HonorSignDependentRoundingFPMathOption;
 }
-
-/// NOTE: There are targets that still do not support the call site info
-/// production (the info about the arguments passed to the call, necessary
-/// for the debug entry values), so we keep using the experimental option
-/// (-debug-entry-values) to test them as well.
-bool TargetOptions::ShouldEmitDebugEntryValues() const {
-  return SupportsDebugEntryValues || EnableDebugEntryValues;
-}

diff  --git a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
index 0f2b5eb29bfe..294663c64b3f 100644
--- a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+++ b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
@@ -4212,7 +4212,7 @@ AArch64TargetLowering::LowerCall(CallLoweringInfo &CLI,
         RegsToPass.emplace_back(VA.getLocReg(), Arg);
         RegsUsed.insert(VA.getLocReg());
         const TargetOptions &Options = DAG.getTarget().Options;
-        if (Options.SupportsDebugEntryValues)
+        if (Options.EnableDebugEntryValues)
           CSInfo.emplace_back(VA.getLocReg(), i);
       }
     } else {

diff  --git a/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp b/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
index 6a35ee8d4618..9933c64dc873 100644
--- a/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
+++ b/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
@@ -6585,8 +6585,7 @@ Optional<RegImmPair> AArch64InstrInfo::isAddImmediate(const MachineInstr &MI,
 
   // TODO: Handle cases where Reg is a super- or sub-register of the
   // destination register.
-  const MachineOperand &Op0 = MI.getOperand(0);
-  if (!Op0.isReg() || Reg != Op0.getReg())
+  if (Reg != MI.getOperand(0).getReg())
     return None;
 
   switch (MI.getOpcode()) {

diff  --git a/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp b/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
index d50bd090aeee..bc7b4384662a 100644
--- a/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
+++ b/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
@@ -309,9 +309,6 @@ AArch64TargetMachine::AArch64TargetMachine(const Target &T, const Triple &TT,
 
   // AArch64 supports default outlining behaviour.
   setSupportsDefaultOutlining(true);
-
-  // AArch64 supports the debug entry values.
-  setSupportsDebugEntryValues(true);
 }
 
 AArch64TargetMachine::~AArch64TargetMachine() = default;

diff  --git a/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp b/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
index 51df9cef495b..bc8d1e6487a7 100644
--- a/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
+++ b/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
@@ -5353,8 +5353,7 @@ Optional<RegImmPair> ARMBaseInstrInfo::isAddImmediate(const MachineInstr &MI,
 
   // TODO: Handle cases where Reg is a super- or sub-register of the
   // destination register.
-  const MachineOperand &Op0 = MI.getOperand(0);
-  if (!Op0.isReg() || Reg != Op0.getReg())
+  if (Reg != MI.getOperand(0).getReg())
     return None;
 
   // We describe SUBri or ADDri instructions.
@@ -5366,7 +5365,8 @@ Optional<RegImmPair> ARMBaseInstrInfo::isAddImmediate(const MachineInstr &MI,
   // TODO: Third operand can be global address (usually some string). Since
   //       strings can be relocated we cannot calculate their offsets for
   //       now.
-  if (!MI.getOperand(1).isReg() || !MI.getOperand(2).isImm())
+  if (!MI.getOperand(0).isReg() || !MI.getOperand(1).isReg() ||
+      !MI.getOperand(2).isImm())
     return None;
 
   Offset = MI.getOperand(2).getImm() * Sign;

diff  --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp
index 203405f7b451..68f119d72efb 100644
--- a/llvm/lib/Target/ARM/ARMISelLowering.cpp
+++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp
@@ -2237,7 +2237,7 @@ ARMTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
         isThisReturn = true;
       }
       const TargetOptions &Options = DAG.getTarget().Options;
-      if (Options.SupportsDebugEntryValues)
+      if (Options.EnableDebugEntryValues)
         CSInfo.emplace_back(VA.getLocReg(), i);
       RegsToPass.push_back(std::make_pair(VA.getLocReg(), Arg));
     } else if (isByVal) {

diff  --git a/llvm/lib/Target/ARM/ARMTargetMachine.cpp b/llvm/lib/Target/ARM/ARMTargetMachine.cpp
index 63aa65267ef2..84876eda33a6 100644
--- a/llvm/lib/Target/ARM/ARMTargetMachine.cpp
+++ b/llvm/lib/Target/ARM/ARMTargetMachine.cpp
@@ -243,9 +243,6 @@ ARMBaseTargetMachine::ARMBaseTargetMachine(const Target &T, const Triple &TT,
     this->Options.NoTrapAfterNoreturn = true;
   }
 
-  // ARM supports the debug entry values.
-  setSupportsDebugEntryValues(true);
-
   initAsmInfo();
 }
 

diff  --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index ea91e522700c..3845ce4fee2c 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -4020,7 +4020,7 @@ X86TargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
     } else if (VA.isRegLoc()) {
       RegsToPass.push_back(std::make_pair(VA.getLocReg(), Arg));
       const TargetOptions &Options = DAG.getTarget().Options;
-      if (Options.SupportsDebugEntryValues)
+      if (Options.EnableDebugEntryValues)
         CSInfo.emplace_back(VA.getLocReg(), I);
       if (isVarArg && IsWin64) {
         // Win64 ABI requires argument XMM reg to be copied to the corresponding

diff  --git a/llvm/lib/Target/X86/X86TargetMachine.cpp b/llvm/lib/Target/X86/X86TargetMachine.cpp
index 0cfa7bb04771..22b4e2805a5e 100644
--- a/llvm/lib/Target/X86/X86TargetMachine.cpp
+++ b/llvm/lib/Target/X86/X86TargetMachine.cpp
@@ -232,9 +232,6 @@ X86TargetMachine::X86TargetMachine(const Target &T, const Triple &TT,
 
   setMachineOutliner(true);
 
-  // x86 supports the debug entry values.
-  setSupportsDebugEntryValues(true);
-
   initAsmInfo();
 }
 

diff  --git a/llvm/test/CodeGen/AArch64/arm64-anyregcc.ll b/llvm/test/CodeGen/AArch64/arm64-anyregcc.ll
index 10989a07990c..33bbfa2d81d9 100644
--- a/llvm/test/CodeGen/AArch64/arm64-anyregcc.ll
+++ b/llvm/test/CodeGen/AArch64/arm64-anyregcc.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -mtriple=arm64-apple-darwin | FileCheck %s
+; RUN: llc < %s -debug-entry-values -mtriple=arm64-apple-darwin | FileCheck %s
 
 ; Stackmap Header: no constants - 6 callsites
 ; CHECK-LABEL: .section	__LLVM_STACKMAPS,__llvm_stackmaps

diff  --git a/llvm/test/CodeGen/AArch64/arm64-patchpoint.ll b/llvm/test/CodeGen/AArch64/arm64-patchpoint.ll
index 2f9004bb22e6..b64f2455908e 100644
--- a/llvm/test/CodeGen/AArch64/arm64-patchpoint.ll
+++ b/llvm/test/CodeGen/AArch64/arm64-patchpoint.ll
@@ -1,5 +1,5 @@
-; RUN: llc -mtriple=arm64-apple-darwin -enable-misched=0 -mcpu=cyclone                             < %s | FileCheck %s
-; RUN: llc -mtriple=arm64-apple-darwin -enable-misched=0 -mcpu=cyclone -fast-isel -fast-isel-abort=1 < %s | FileCheck %s
+; RUN: llc -mtriple=arm64-apple-darwin -debug-entry-values -enable-misched=0 -mcpu=cyclone                             < %s | FileCheck %s
+; RUN: llc -mtriple=arm64-apple-darwin -debug-entry-values -enable-misched=0 -mcpu=cyclone -fast-isel -fast-isel-abort=1 < %s | FileCheck %s
 
 ; Trivial patchpoint codegen
 ;

diff  --git a/llvm/test/CodeGen/AArch64/arm64-tls-dynamics.ll b/llvm/test/CodeGen/AArch64/arm64-tls-dynamics.ll
index 7be781f4c6a2..9a24d6acfa11 100644
--- a/llvm/test/CodeGen/AArch64/arm64-tls-dynamics.ll
+++ b/llvm/test/CodeGen/AArch64/arm64-tls-dynamics.ll
@@ -1,6 +1,6 @@
 ; Verify the call site info. If the call site info is not
 ; in the valid state, an assert should be triggered.
-; RUN: llc < %s -mtriple=arm64-none-linux-gnu -stop-after=machineverifier -relocation-model=pic -aarch64-elf-ldtls-generation=1 < %s
+; RUN: llc < %s -debug-entry-values -mtriple=arm64-none-linux-gnu -stop-after=machineverifier -relocation-model=pic -aarch64-elf-ldtls-generation=1 < %s
 
 ; RUN: llc -mtriple=arm64-none-linux-gnu -relocation-model=pic -aarch64-elf-ldtls-generation=1 -verify-machineinstrs < %s | FileCheck %s
 ; RUN: llc -mtriple=arm64-none-linux-gnu -relocation-model=pic -aarch64-elf-ldtls-generation=1 -filetype=obj < %s | llvm-objdump -r - | FileCheck --check-prefix=CHECK-RELOC %s

diff  --git a/llvm/test/CodeGen/ARM/smml.ll b/llvm/test/CodeGen/ARM/smml.ll
index 9ddb1a28301d..712aaa4392f6 100644
--- a/llvm/test/CodeGen/ARM/smml.ll
+++ b/llvm/test/CodeGen/ARM/smml.ll
@@ -10,7 +10,7 @@
 
 ; Next test would previously trigger an assertion responsible for verification of
 ; call site info state.
-; RUN: llc -stop-after=if-converter -mtriple=thumbv6t2-eabi %s -o -| FileCheck %s -check-prefix=CHECK-CALLSITE
+; RUN: llc -stop-after=if-converter -debug-entry-values -mtriple=thumbv6t2-eabi %s -o -| FileCheck %s -check-prefix=CHECK-CALLSITE
 ; CHECK-CALLSITE: name:  test_used_flags
 ; CHECK-CALLSITE: callSites:
 

diff  --git a/llvm/test/CodeGen/MIR/Hexagon/bundled-call-site-info.mir b/llvm/test/CodeGen/MIR/Hexagon/bundled-call-site-info.mir
index 96a9411af311..5ffa0293a2e1 100644
--- a/llvm/test/CodeGen/MIR/Hexagon/bundled-call-site-info.mir
+++ b/llvm/test/CodeGen/MIR/Hexagon/bundled-call-site-info.mir
@@ -1,5 +1,3 @@
-# We do not support the call site info for the target now, so we use the experimental option (-debug-entry-values).
-
 # RUN: llc -debug-entry-values -run-pass=none -verify-machineinstrs -o - %s | FileCheck %s
 
 # Verify that it is possible to read and write MIR where a callSites entry

diff  --git a/llvm/test/CodeGen/MIR/X86/call-site-info-error1.mir b/llvm/test/CodeGen/MIR/X86/call-site-info-error1.mir
index c28e1d7084ff..096a80f77dbb 100644
--- a/llvm/test/CodeGen/MIR/X86/call-site-info-error1.mir
+++ b/llvm/test/CodeGen/MIR/X86/call-site-info-error1.mir
@@ -1,4 +1,4 @@
-# RUN: not llc -mtriple=x86_64-- -run-pass none %s -o - 2>&1 | FileCheck %s
+# RUN: not llc -mtriple=x86_64-- -run-pass none -debug-entry-values %s -o - 2>&1 | FileCheck %s
 # CHECK: baa call instruction block out of range. Unable to reference bb:1
 --- |
   define dso_local i32 @baa(i32 %a) local_unnamed_addr {

diff  --git a/llvm/test/CodeGen/MIR/X86/call-site-info-error2.mir b/llvm/test/CodeGen/MIR/X86/call-site-info-error2.mir
index ca26a738f6e5..bd5b2451a8d7 100644
--- a/llvm/test/CodeGen/MIR/X86/call-site-info-error2.mir
+++ b/llvm/test/CodeGen/MIR/X86/call-site-info-error2.mir
@@ -1,4 +1,4 @@
-# RUN: not llc -mtriple=x86_64-- -run-pass none %s -o - 2>&1 | FileCheck %s
+# RUN: not llc -mtriple=x86_64-- -run-pass none -debug-entry-values %s -o - 2>&1 | FileCheck %s
 # CHECK: baa call instruction offset out of range. Unable to reference instruction at bb: 0 at offset:1
 --- |
   define dso_local i32 @baa(i32 %a) local_unnamed_addr {

diff  --git a/llvm/test/CodeGen/MIR/X86/call-site-info-error3.mir b/llvm/test/CodeGen/MIR/X86/call-site-info-error3.mir
index 3271a8b3a80c..ded9fd2bb1bc 100644
--- a/llvm/test/CodeGen/MIR/X86/call-site-info-error3.mir
+++ b/llvm/test/CodeGen/MIR/X86/call-site-info-error3.mir
@@ -1,4 +1,4 @@
-# RUN: not llc -mtriple=x86_64-- -run-pass none %s -o - 2>&1 | FileCheck %s
+# RUN: not llc -mtriple=x86_64-- -run-pass none -debug-entry-values %s -o - 2>&1 | FileCheck %s
 # CHECK: baa call site info should reference call instruction. Instruction at bb:0 at offset:0 is not a call instruction
 --- |
   define dso_local i32 @baa(i32 %a) local_unnamed_addr {

diff  --git a/llvm/test/CodeGen/MIR/X86/call-site-info-error4.mir b/llvm/test/CodeGen/MIR/X86/call-site-info-error4.mir
index 8f71d2b21da3..2472aa707e16 100644
--- a/llvm/test/CodeGen/MIR/X86/call-site-info-error4.mir
+++ b/llvm/test/CodeGen/MIR/X86/call-site-info-error4.mir
@@ -1,5 +1,5 @@
-# RUN: llc -mtriple=x86_64-- -run-pass none %s -o - 2>&1 | FileCheck %s
-# CHECK-NOT: Call site info provided but not used
+# RUN: not llc -mtriple=x86_64-- -run-pass none %s -o - 2>&1 | FileCheck %s
+# CHECK: Call site info provided but not used
 --- |
   define dso_local i32 @baa(i32 %a) local_unnamed_addr {
   entry:

diff  --git a/llvm/test/CodeGen/X86/call-site-info-output.ll b/llvm/test/CodeGen/X86/call-site-info-output.ll
index 8586d34762db..4b1e236aadfe 100644
--- a/llvm/test/CodeGen/X86/call-site-info-output.ll
+++ b/llvm/test/CodeGen/X86/call-site-info-output.ll
@@ -1,6 +1,6 @@
 ; Test call site info MIR printer and parser.Parser assertions and machine
 ; verifier will check the rest;
-; RUN: llc %s -stop-before=finalize-isel -o %t.mir
+; RUN: llc -debug-entry-values %s -stop-before=finalize-isel -o %t.mir
 ; RUN: cat %t.mir | FileCheck %s
 ; CHECK: name: fn2
 ; CHECK: callSites:
@@ -10,7 +10,7 @@
 ; CHECK-NEXT:   arg: 0, reg: '$edi'
 ; CHECK-NEXT:   arg: 1, reg: '$esi'
 ; CHECK-NEXT:   arg: 2, reg: '$edx'
-; RUN: llc %t.mir -run-pass=finalize-isel -o -| FileCheck %s --check-prefix=PARSER
+; RUN: llc -debug-entry-values %t.mir -run-pass=finalize-isel -o -| FileCheck %s --check-prefix=PARSER
 ; Verify that we are able to parse output mir and that we are getting the same result.
 ; PARSER: name: fn2
 ; PARSER: callSites:

diff  --git a/llvm/test/CodeGen/X86/hoist-invariant-load.ll b/llvm/test/CodeGen/X86/hoist-invariant-load.ll
index 0c7ec862c7a6..13b72bdfc6dc 100644
--- a/llvm/test/CodeGen/X86/hoist-invariant-load.ll
+++ b/llvm/test/CodeGen/X86/hoist-invariant-load.ll
@@ -2,7 +2,7 @@
 
 ; Verify the call site info. If the call site info is not
 ; in the valid state, an assert should be triggered.
-; RUN: llc < %s -stop-after=machineverifier
+; RUN: llc < %s -debug-entry-values -stop-after=machineverifier
 
 ; REQUIRES: asserts
 ; RUN: llc -mcpu=haswell < %s -O2 2>&1 | FileCheck %s

diff  --git a/llvm/test/CodeGen/X86/speculative-load-hardening-indirect.ll b/llvm/test/CodeGen/X86/speculative-load-hardening-indirect.ll
index 8bab95a04195..f393595ef9bd 100644
--- a/llvm/test/CodeGen/X86/speculative-load-hardening-indirect.ll
+++ b/llvm/test/CodeGen/X86/speculative-load-hardening-indirect.ll
@@ -2,7 +2,7 @@
 
 ; Verify the call site info. If the call site info is not
 ; in the valid state, an assert should be triggered.
-; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -x86-speculative-load-hardening -stop-after=machineverifier
+; RUN: llc < %s -debug-entry-values -mtriple=x86_64-unknown-linux-gnu -x86-speculative-load-hardening -stop-after=machineverifier
 
 ; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -x86-speculative-load-hardening -data-sections | FileCheck %s --check-prefix=X64
 ; FIXME: Fix machine verifier issues and remove -verify-machineinstrs=0. PR39451.

diff  --git a/llvm/test/CodeGen/X86/statepoint-allocas.ll b/llvm/test/CodeGen/X86/statepoint-allocas.ll
index c7bae8ff18c1..e469f38b311e 100644
--- a/llvm/test/CodeGen/X86/statepoint-allocas.ll
+++ b/llvm/test/CodeGen/X86/statepoint-allocas.ll
@@ -1,5 +1,5 @@
 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
-; RUN: llc -verify-machineinstrs < %s | FileCheck %s
+; RUN: llc -verify-machineinstrs -debug-entry-values < %s | FileCheck %s
 ; Check that we can lower a use of an alloca both as a deopt value (where the
 ; exact meaning is up to the consumer of the stackmap) and as an explicit spill
 ; slot used for GC.

diff  --git a/llvm/test/CodeGen/X86/tail-dup-repeat.ll b/llvm/test/CodeGen/X86/tail-dup-repeat.ll
index 9a06c9a723bb..fffc135fa526 100644
--- a/llvm/test/CodeGen/X86/tail-dup-repeat.ll
+++ b/llvm/test/CodeGen/X86/tail-dup-repeat.ll
@@ -1,5 +1,5 @@
 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
-; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu | FileCheck %s
+; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -debug-entry-values | FileCheck %s
 
 ; Function Attrs: uwtable
 ; When tail-duplicating during placement, we work backward from blocks with

diff  --git a/llvm/test/CodeGen/X86/xray-custom-log.ll b/llvm/test/CodeGen/X86/xray-custom-log.ll
index 3a3d6a5df0d0..f53e6c676c3b 100644
--- a/llvm/test/CodeGen/X86/xray-custom-log.ll
+++ b/llvm/test/CodeGen/X86/xray-custom-log.ll
@@ -1,5 +1,5 @@
-; RUN: llc -verify-machineinstrs -filetype=asm -o - -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s
-; RUN: llc -verify-machineinstrs -filetype=asm -o - \
+; RUN: llc -verify-machineinstrs -debug-entry-values -filetype=asm -o - -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s
+; RUN: llc -verify-machineinstrs -debug-entry-values -filetype=asm -o - \
 ; RUN:     -mtriple=x86_64-unknown-linux-gnu -relocation-model=pic < %s | FileCheck %s -check-prefix=PIC
 
 define i32 @fn() nounwind noinline uwtable "function-instrument"="xray-always" {

diff  --git a/llvm/test/CodeGen/X86/xray-typed-event-log.ll b/llvm/test/CodeGen/X86/xray-typed-event-log.ll
index 0ed8ed7f6593..aa7e19947f95 100644
--- a/llvm/test/CodeGen/X86/xray-typed-event-log.ll
+++ b/llvm/test/CodeGen/X86/xray-typed-event-log.ll
@@ -1,5 +1,5 @@
-; RUN: llc -verify-machineinstrs -filetype=asm -o - -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s
-; RUN: llc -verify-machineinstrs -filetype=asm -o - -mtriple=x86_64-unknown-linux-gnu \
+; RUN: llc -verify-machineinstrs -debug-entry-values -filetype=asm -o - -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s
+; RUN: llc -verify-machineinstrs -debug-entry-values -filetype=asm -o - -mtriple=x86_64-unknown-linux-gnu \
 ; RUN:    -relocation-model=pic < %s | FileCheck %s -check-prefix=PIC
 
 define i32 @fn() nounwind noinline uwtable "function-instrument"="xray-always" {

diff  --git a/llvm/test/DebugInfo/AArch64/call-site-info-output.ll b/llvm/test/DebugInfo/AArch64/call-site-info-output.ll
index 6817aabd602b..d52d6962f3c4 100644
--- a/llvm/test/DebugInfo/AArch64/call-site-info-output.ll
+++ b/llvm/test/DebugInfo/AArch64/call-site-info-output.ll
@@ -1,4 +1,4 @@
-; RUN: llc -mtriple aarch64-linux-gnu %s -o - -stop-before=finalize-isel | FileCheck %s
+; RUN: llc -mtriple aarch64-linux-gnu -debug-entry-values %s -o - -stop-before=finalize-isel | FileCheck %s
 ; Verify that Selection DAG knows how to recognize simple function parameter forwarding registers.
 ; Produced from:
 ; extern int fn1(int,int,int);

diff  --git a/llvm/test/DebugInfo/ARM/call-site-info-output.ll b/llvm/test/DebugInfo/ARM/call-site-info-output.ll
index e1cd900aefb1..9255a7d57dde 100644
--- a/llvm/test/DebugInfo/ARM/call-site-info-output.ll
+++ b/llvm/test/DebugInfo/ARM/call-site-info-output.ll
@@ -1,4 +1,4 @@
-; RUN: llc -mtriple arm-linux-gnu %s -o - -stop-before=finalize-isel | FileCheck %s
+; RUN: llc -mtriple arm-linux-gnu -debug-entry-values %s -o - -stop-before=finalize-isel | FileCheck %s
 ; Verify that Selection DAG knows how to recognize simple function parameter forwarding registers.
 ; Produced from:
 ; extern int fn1(int,int,int);

diff  --git a/llvm/test/DebugInfo/ARM/entry-value-multi-byte-expr.ll b/llvm/test/DebugInfo/ARM/entry-value-multi-byte-expr.ll
index 4c5a38161c70..71cf41782720 100644
--- a/llvm/test/DebugInfo/ARM/entry-value-multi-byte-expr.ll
+++ b/llvm/test/DebugInfo/ARM/entry-value-multi-byte-expr.ll
@@ -1,4 +1,4 @@
-; RUN: llc -filetype=asm -o - %s | FileCheck %s
+; RUN: llc -debug-entry-values -filetype=asm -o - %s | FileCheck %s
 
 ; Verify that the size operands of the DW_OP_GNU_entry_value operations are
 ; correct for the multi-byte DW_OP_regx expressions.

diff  --git a/llvm/test/DebugInfo/MIR/AArch64/dbgcall-site-interpret-movzxi.mir b/llvm/test/DebugInfo/MIR/AArch64/dbgcall-site-interpret-movzxi.mir
index 8fdfe37d7db5..dc7561ca6400 100644
--- a/llvm/test/DebugInfo/MIR/AArch64/dbgcall-site-interpret-movzxi.mir
+++ b/llvm/test/DebugInfo/MIR/AArch64/dbgcall-site-interpret-movzxi.mir
@@ -1,4 +1,4 @@
-# RUN: llc -mtriple aarch64-linux-gnu -start-after=machineverifier -filetype=obj %s -o -| llvm-dwarfdump -| FileCheck %s
+# RUN: llc -mtriple aarch64-linux-gnu -debug-entry-values -start-after=machineverifier -filetype=obj %s -o -| llvm-dwarfdump -| FileCheck %s
 #
 # Based on the following C reproducer:
 #

diff  --git a/llvm/test/DebugInfo/MIR/AArch64/dbgcall-site-interpretation.mir b/llvm/test/DebugInfo/MIR/AArch64/dbgcall-site-interpretation.mir
index 559a11d3d536..0371ccef603e 100644
--- a/llvm/test/DebugInfo/MIR/AArch64/dbgcall-site-interpretation.mir
+++ b/llvm/test/DebugInfo/MIR/AArch64/dbgcall-site-interpretation.mir
@@ -1,4 +1,4 @@
-# RUN: llc -mtriple aarch64-linux-gnu -start-after=machineverifier -filetype=obj %s -o -| llvm-dwarfdump -| FileCheck %s
+# RUN: llc -mtriple aarch64-linux-gnu -debug-entry-values -start-after=machineverifier -filetype=obj %s -o -| llvm-dwarfdump -| FileCheck %s
 # Following code is used for producing this test case. Note that
 # some of argument loading instruction are modified in order to
 # cover certain cases.

diff  --git a/llvm/test/DebugInfo/MIR/AArch64/dbgcall-site-orr-moves.mir b/llvm/test/DebugInfo/MIR/AArch64/dbgcall-site-orr-moves.mir
index 72540049612f..9d4feaccf9e7 100644
--- a/llvm/test/DebugInfo/MIR/AArch64/dbgcall-site-orr-moves.mir
+++ b/llvm/test/DebugInfo/MIR/AArch64/dbgcall-site-orr-moves.mir
@@ -1,4 +1,4 @@
-# RUN: llc -start-after=livedebugvalues -filetype=obj -o - %s | llvm-dwarfdump - | FileCheck %s
+# RUN: llc -debug-entry-values -start-after=livedebugvalues -filetype=obj -o - %s | llvm-dwarfdump - | FileCheck %s
 
 # Based on the following C reproducer:
 #

diff  --git a/llvm/test/DebugInfo/MIR/ARM/dbgcall-site-interpretation.mir b/llvm/test/DebugInfo/MIR/ARM/dbgcall-site-interpretation.mir
index 507250d0e5a1..ce8dc97f0e72 100644
--- a/llvm/test/DebugInfo/MIR/ARM/dbgcall-site-interpretation.mir
+++ b/llvm/test/DebugInfo/MIR/ARM/dbgcall-site-interpretation.mir
@@ -1,4 +1,4 @@
-# RUN: llc -mtriple=arm-linux-gnueabi -filetype=obj -start-after=machineverifier %s -o -| llvm-dwarfdump -| FileCheck %s
+# RUN: llc -mtriple=arm-linux-gnueabi -debug-entry-values -filetype=obj -start-after=machineverifier %s -o -| llvm-dwarfdump -| FileCheck %s
 # Following code is used for producing this test case. Note that
 # some of argument loading instruction are modified in order to
 # cover certain cases.

diff  --git a/llvm/test/DebugInfo/MIR/ARM/dbgcall-site-propagated-value.mir b/llvm/test/DebugInfo/MIR/ARM/dbgcall-site-propagated-value.mir
index 13012a7dc106..9001c8ba8eea 100644
--- a/llvm/test/DebugInfo/MIR/ARM/dbgcall-site-propagated-value.mir
+++ b/llvm/test/DebugInfo/MIR/ARM/dbgcall-site-propagated-value.mir
@@ -1,4 +1,4 @@
-# RUN: llc -run-pass=livedebugvalues -o - %s | FileCheck %s
+# RUN: llc -debug-entry-values -run-pass=livedebugvalues -o - %s | FileCheck %s
 
 # Based on the following C reproducer:
 #
@@ -20,7 +20,7 @@
 #
 # Generated using:
 #
-# clang -Os -fno-inline -g --target=armeb.
+# clang -Os -fno-inline -Xclang -femit-debug-entry-values -g --target=armeb.
 
 --- |
   target datalayout = "E-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"

diff  --git a/llvm/test/DebugInfo/MIR/ARM/dbgcallsite-noreg-is-imm-check.mir b/llvm/test/DebugInfo/MIR/ARM/dbgcallsite-noreg-is-imm-check.mir
deleted file mode 100644
index 990cf18ccd70..000000000000
--- a/llvm/test/DebugInfo/MIR/ARM/dbgcallsite-noreg-is-imm-check.mir
+++ /dev/null
@@ -1,76 +0,0 @@
-# RUN: llc -mtriple=armebv6k-unknown-linux-gnueabihf -filetype=obj -start-after=machineverifier %s -o -| llvm-dwarfdump - | FileCheck %s --implicit-check-not=DW_TAG_GNU_call_site_parameter
-
-## The test was handmade.
-
---- |
-  ; ModuleID = 'test.c'
-  source_filename = "test.c"
-  target datalayout = "E-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
-  target triple = "armebv6k-unknown-linux-gnueabihf"
-  
-  ; Function Attrs: nounwind
-  define dso_local arm_aapcscc i32 @func1(i32 %arg1) local_unnamed_addr !dbg !14 {
-  entry:
-    %add = add nsw i32 %arg1, 2, !dbg !19
-    %a = alloca i32, align 4
-    call void @llvm.dbg.value(metadata i32 %arg1, metadata !18, metadata !DIExpression()), !dbg !19
-    %call = call arm_aapcscc i32 @func2(i32 %add), !dbg !19
-    ret i32  0, !dbg !19
-  }
-  
-  
-  declare !dbg !4 dso_local arm_aapcscc i32 @func2(i32) local_unnamed_addr
-  
-  ; Function Attrs: nounwind readnone speculatable willreturn
-  declare void @llvm.dbg.value(metadata, metadata, metadata)
-  
-  !llvm.dbg.cu = !{!0}
-  !llvm.module.flags = !{!9, !10, !11, !12}
-  !llvm.ident = !{!13}
-  
-  !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 10.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !3, nameTableKind: None)
-  !1 = !DIFile(filename: "test.c", directory: "/")
-  !2 = !{}
-  !3 = !{!4}
-  !4 = !DISubprogram(name: "func2", scope: !1, file: !1, line: 8, type: !5, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized, retainedNodes: !2)
-  !5 = !DISubroutineType(types: !6)
-  !6 = !{!7, !7, !7, !8}
-  !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
-  !8 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !7, size: 32)
-  !9 = !{i32 2, !"Dwarf Version", i32 4}
-  !10 = !{i32 2, !"Debug Info Version", i32 3}
-  !11 = !{i32 1, !"wchar_size", i32 4}
-  !12 = !{i32 1, !"min_enum_size", i32 4}
-  !13 = !{!"clang version 10.0.0"}
-  !14 = distinct !DISubprogram(name: "func1", scope: !1, file: !1, line: 9, type: !15, scopeLine: 9, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !17)
-  !15 = !DISubroutineType(types: !16)
-  !16 = !{!7, !7, !7, !7}
-  !17 = !{!18}
-  !18 = !DILocalVariable(name: "arg1", arg: 1, scope: !14, file: !1, line: 9, type: !7)
-  !19 = !DILocation(line: 0, scope: !14)
-...
----
-name:            func1
-alignment:       4
-callSites:
-  - { bb: 0, offset: 11, fwdArgRegs: 
-      - { arg: 0, reg: '$r0' } }
-body:             |
-  bb.0.entry:
-    liveins: $r0, $r1, $r2, $r4, $r10, $lr
-  
-    DBG_VALUE $r0, $noreg, !18, !DIExpression(), debug-location !19
-    $sp = frame-setup STMDB_UPD $sp, 14, $noreg, killed $r4, killed $r10, $r11, killed $lr
-    frame-setup CFI_INSTRUCTION def_cfa_offset 16
-    frame-setup CFI_INSTRUCTION offset $lr, -4
-    frame-setup CFI_INSTRUCTION offset $r11, -8
-    frame-setup CFI_INSTRUCTION offset $r10, -12
-    frame-setup CFI_INSTRUCTION offset $r4, -16
-    $r11 = frame-setup ADDri $sp, 8, 14, $noreg, $noreg
-    frame-setup CFI_INSTRUCTION def_cfa $r11, 8
-    $sp = frame-setup SUBri $sp, 8, 14, $noreg, $noreg
-    INLINEASM &"rev $0, $1", 0, 327690, def renamable $r0, 327689, killed renamable $r4, 0, debug-location !19
-    BL @func2, csr_aapcs, implicit-def dead $lr, implicit $sp, implicit killed $r0, implicit killed $r1, implicit killed $r2, implicit-def $sp, implicit-def $r0, debug-location !19
-    BX_RET 14, $noreg, implicit killed $r0, debug-location !19
-
-...

diff  --git a/llvm/test/DebugInfo/MIR/ARM/if-coverter-call-site-info.mir b/llvm/test/DebugInfo/MIR/ARM/if-coverter-call-site-info.mir
index b2b9580cdc7b..aa7b54c1e5bb 100644
--- a/llvm/test/DebugInfo/MIR/ARM/if-coverter-call-site-info.mir
+++ b/llvm/test/DebugInfo/MIR/ARM/if-coverter-call-site-info.mir
@@ -1,4 +1,4 @@
-# RUN: llc -mtriple=arm-linux-gnu -run-pass if-converter %s -o -| FileCheck %s
+# RUN: llc -mtriple=arm-linux-gnu -debug-entry-values -run-pass if-converter %s -o -| FileCheck %s
 
 # Vefify that the call site info will be updated after the optimization.
 # This test case would previously trigger an assertion when
@@ -19,7 +19,8 @@
 #
 # With slight change of MIR - substitution of BL instruction with BL_pred 
 # in order to trigger optimization.
-# clang -target arm-linux-gnu -g -O2 %s -stop-before=if-convert
+# clang -target arm-linux-gnu -g -O2 -Xclang -femit-debug-entry-values 
+#       %s -stop-before=if-convert
 #
 # CHECK: callSites:
 # CHECK-NEXT: - { bb: {{.*}}, offset: {{.*}}, fwdArgRegs:

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
index a86cd7f7a440..8ae628af2c09 100644
--- 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
@@ -1,6 +1,4 @@
-# We do not support the call site info for the target now, so we use the experimental option (-debug-entry-values).
-
-# RUN: llc -debug-entry-values -mtriple hexagon -start-after=machineverifier -filetype=obj %s -o - | llvm-dwarfdump - | FileCheck %s
+# RUN: llc -mtriple hexagon -debug-entry-values -start-after=machineverifier -filetype=obj %s -o - | llvm-dwarfdump - | FileCheck %s
 
 # Based on the following C reproducer:
 #

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
index 956db574c59d..ff0a539dd15d 100644
--- 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
@@ -1,5 +1,3 @@
-# We do not support the call site info for the target now, so we use the experimental option (-debug-entry-values).
-
 # RUN: llc -debug-entry-values -run-pass=livedebugvalues -o - %s | FileCheck %s
 
 # Verify that the entry values for the input parameters are inserted after the

diff  --git a/llvm/test/DebugInfo/MIR/SystemZ/call-site-lzer.mir b/llvm/test/DebugInfo/MIR/SystemZ/call-site-lzer.mir
index 4f06b1a639e5..8a4e8b5632c2 100644
--- a/llvm/test/DebugInfo/MIR/SystemZ/call-site-lzer.mir
+++ b/llvm/test/DebugInfo/MIR/SystemZ/call-site-lzer.mir
@@ -1,5 +1,3 @@
-# We do not support the call site info for the target now, so we use the experimental option (-debug-entry-values).
-
 # RUN: llc -debug-entry-values -start-after=livedebugvalues -o - %s | FileCheck %s
 
 # This test would previously trigger an assertion when trying to describe the

diff  --git a/llvm/test/DebugInfo/MIR/X86/DW_OP_entry_value.mir b/llvm/test/DebugInfo/MIR/X86/DW_OP_entry_value.mir
index f7f74b628d16..e6fe5d2de878 100644
--- a/llvm/test/DebugInfo/MIR/X86/DW_OP_entry_value.mir
+++ b/llvm/test/DebugInfo/MIR/X86/DW_OP_entry_value.mir
@@ -1,4 +1,4 @@
-# RUN: llc -start-before=livedebugvalues -mtriple=x86_64-apple-darwin -o %t %s -filetype=obj
+# RUN: llc -debug-entry-values -start-before=livedebugvalues -mtriple=x86_64-apple-darwin -o %t %s -filetype=obj
 # RUN: llvm-dwarfdump %t | FileCheck %s
 #
 # int global;

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
index 0718878e0faa..1c5922ce76f0 100644
--- 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
@@ -1,18 +1,14 @@
 # Test the call site encoding in DWARF5 vs GNU extensions.
 #
-# RUN: llc -dwarf-version 4 -debugger-tune=gdb -filetype=obj \
+# RUN: llc -dwarf-version 4 -debugger-tune=gdb -debug-entry-values -filetype=obj \
 # RUN:     -mtriple=x86_64-unknown-unknown -start-after=machineverifier -o - %s  \
 # RUN:     | llvm-dwarfdump - | FileCheck %s -check-prefixes=CHECK-GNU
 #
-# RUN: llc -dwarf-version 5 -debugger-tune=lldb -filetype=obj \
+# RUN: llc -dwarf-version 5 -debugger-tune=lldb -debug-entry-values -filetype=obj \
 # RUN:     -mtriple=x86_64-unknown-unknown -start-after=machineverifier -o - %s   \
 # RUN:     | llvm-dwarfdump - | FileCheck %s -check-prefixes=CHECK-DWARF5
 #
-# RUN: llc -dwarf-version 5 -filetype=obj \
-# RUN:     -mtriple=x86_64-unknown-unknown -start-after=machineverifier -o - %s   \
-# RUN:     | llvm-dwarfdump - | FileCheck %s -check-prefixes=CHECK-DWARF5
-#
-# RUN: llc -dwarf-version 5 -filetype=obj -debugger-tune=sce -emit-debug-entry-values \
+# RUN: llc -dwarf-version 5 -debug-entry-values -filetype=obj \
 # RUN:     -mtriple=x86_64-unknown-unknown -start-after=machineverifier -o - %s   \
 # RUN:     | llvm-dwarfdump - | FileCheck %s -check-prefixes=CHECK-DWARF5
 #

diff  --git a/llvm/test/DebugInfo/MIR/X86/dbg-call-site-spilled-arg-multiple-defs.mir b/llvm/test/DebugInfo/MIR/X86/dbg-call-site-spilled-arg-multiple-defs.mir
index 127706fade2e..cfb5a74056d9 100644
--- a/llvm/test/DebugInfo/MIR/X86/dbg-call-site-spilled-arg-multiple-defs.mir
+++ b/llvm/test/DebugInfo/MIR/X86/dbg-call-site-spilled-arg-multiple-defs.mir
@@ -2,10 +2,10 @@
 # into the forwarding register has a memory operand and multiple defs.
 # The generated code was modified a bit in order to have the scenario.
 #
-# RUN: llc -start-after=machineverifier -filetype=obj %s -o - \
+# RUN: llc -debug-entry-values -start-after=machineverifier -filetype=obj %s -o - \
 # RUN:  | llvm-dwarfdump - | FileCheck %s --implicit-check-not=DW_TAG_GNU_call_site_parameter
 #
-# Command: clang -g -O2 test.c
+# Command: clang -g -O2 -Xclang -femit-debug-entry-values test.c
 #          -mllvm -stop-before=machineverifier -o test.mir -c
 # extern void callee(int);
 # extern int y;

diff  --git a/llvm/test/DebugInfo/MIR/X86/dbg-call-site-spilled-arg.mir b/llvm/test/DebugInfo/MIR/X86/dbg-call-site-spilled-arg.mir
index 0d161fe26c06..c32a1155d038 100644
--- a/llvm/test/DebugInfo/MIR/X86/dbg-call-site-spilled-arg.mir
+++ b/llvm/test/DebugInfo/MIR/X86/dbg-call-site-spilled-arg.mir
@@ -1,9 +1,9 @@
 # Check that llvm can describe a call site parameter which resides in a spill slot.
 #
-# RUN: llc -start-after=machineverifier -filetype=obj %s -o - | llvm-dwarfdump - | FileCheck %s
+# RUN: llc -debug-entry-values -start-after=machineverifier -filetype=obj %s -o - | llvm-dwarfdump - | FileCheck %s
 # 
 # Command:
-# $ ~/src/builds/llvm-project-master-RA/bin/clang -g -O2 -c -o spill.o spill.cc -mllvm -stop-before=machineverifier -o spill.mir
+# $ ~/src/builds/llvm-project-master-RA/bin/clang -g -Xclang -femit-debug-entry-values -O2 -c -o spill.o spill.cc -mllvm -stop-before=machineverifier -o spill.mir
 #
 # Source:
 ## extern void callee(int);

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
index 271a9c101e77..a2d51a203512 100644
--- a/llvm/test/DebugInfo/MIR/X86/dbgcall-site-copy-super-sub.mir
+++ b/llvm/test/DebugInfo/MIR/X86/dbgcall-site-copy-super-sub.mir
@@ -1,4 +1,4 @@
-# RUN: llc -start-after=livedebugvalues -filetype=obj %s -o -| llvm-dwarfdump -| FileCheck %s
+# RUN: llc -debug-entry-values -start-after=livedebugvalues -filetype=obj %s -o -| llvm-dwarfdump -| FileCheck %s
 
 # Based on the following reproducer:
 #

diff  --git a/llvm/test/DebugInfo/MIR/X86/dbgcall-site-interpretation.mir b/llvm/test/DebugInfo/MIR/X86/dbgcall-site-interpretation.mir
index 5204bae67aed..dc3a425e5690 100644
--- a/llvm/test/DebugInfo/MIR/X86/dbgcall-site-interpretation.mir
+++ b/llvm/test/DebugInfo/MIR/X86/dbgcall-site-interpretation.mir
@@ -1,4 +1,4 @@
-# RUN: llc -start-after=machineverifier -filetype=obj %s -o -| llvm-dwarfdump -| FileCheck %s
+# RUN: llc -debug-entry-values -start-after=machineverifier -filetype=obj %s -o -| llvm-dwarfdump -| FileCheck %s
 #
 # CHECK:        DW_TAG_GNU_call_site
 # CHECK-NEXT:     DW_AT_abstract_origin {{.*}} "foo"

diff  --git a/llvm/test/DebugInfo/MIR/X86/dbgcall-site-lea-interpretation.mir b/llvm/test/DebugInfo/MIR/X86/dbgcall-site-lea-interpretation.mir
index 4530ab6eae99..1bb70f6d4530 100644
--- a/llvm/test/DebugInfo/MIR/X86/dbgcall-site-lea-interpretation.mir
+++ b/llvm/test/DebugInfo/MIR/X86/dbgcall-site-lea-interpretation.mir
@@ -1,4 +1,4 @@
-# RUN: llc -start-after=machineverifier -filetype=obj %s -o -| llvm-dwarfdump -| FileCheck %s
+# RUN: llc -debug-entry-values -start-after=machineverifier -filetype=obj %s -o -| llvm-dwarfdump -| FileCheck %s
 # CHECK:        DW_TAG_GNU_call_site
 # CHECK-NEXT:     DW_AT_abstract_origin {{.*}} "foo")
 # CHECK-NEXT:     DW_AT_low_pc {{.*}}

diff  --git a/llvm/test/DebugInfo/MIR/X86/dbgcall-site-partial-describe.mir b/llvm/test/DebugInfo/MIR/X86/dbgcall-site-partial-describe.mir
index 580eefb9234f..377409518432 100644
--- a/llvm/test/DebugInfo/MIR/X86/dbgcall-site-partial-describe.mir
+++ b/llvm/test/DebugInfo/MIR/X86/dbgcall-site-partial-describe.mir
@@ -1,4 +1,4 @@
-# RUN: llc -start-before=livedebugvalues -filetype=obj -o - %s \
+# RUN: llc -debug-entry-values -start-before=livedebugvalues -filetype=obj -o - %s \
 # RUN:     | llvm-dwarfdump - | FileCheck %s --implicit-check-not=DW_TAG_GNU_call_site_parameter
 
 --- |

diff  --git a/llvm/test/DebugInfo/MIR/X86/dbgcall-site-reference.mir b/llvm/test/DebugInfo/MIR/X86/dbgcall-site-reference.mir
index 73927772ca08..235787573f51 100644
--- a/llvm/test/DebugInfo/MIR/X86/dbgcall-site-reference.mir
+++ b/llvm/test/DebugInfo/MIR/X86/dbgcall-site-reference.mir
@@ -1,4 +1,4 @@
-# RUN: llc -start-before=livedebugvalues -filetype=obj -o - %s | llvm-dwarfdump - | FileCheck %s
+# RUN: llc -debug-entry-values -start-before=livedebugvalues -filetype=obj -o - %s | llvm-dwarfdump - | FileCheck %s
 
 # Based on the following C++ code:
 # struct A { A(A &) {} };

diff  --git a/llvm/test/DebugInfo/MIR/X86/dbgcall-site-reg-shuffle.mir b/llvm/test/DebugInfo/MIR/X86/dbgcall-site-reg-shuffle.mir
index c9bed340bbcd..5b934f6dc533 100644
--- a/llvm/test/DebugInfo/MIR/X86/dbgcall-site-reg-shuffle.mir
+++ b/llvm/test/DebugInfo/MIR/X86/dbgcall-site-reg-shuffle.mir
@@ -1,4 +1,4 @@
-# RUN: llc -start-before=livedebugvalues -filetype=obj -o - %s \
+# RUN: llc -debug-entry-values -start-before=livedebugvalues -filetype=obj -o - %s \
 # RUN:     | llvm-dwarfdump - | FileCheck %s --implicit-check-not=DW_TAG_GNU_call_site_parameter
 
 --- |

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
index 77b26c398ba7..4e1b8fdb5bef 100644
--- 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
@@ -1,4 +1,4 @@
-# RUN: llc -O1 -start-after=livedebugvalues -filetype=obj %s -o - | llvm-dwarfdump - | FileCheck %s
+# RUN: llc -O1 -debug-entry-values -start-after=livedebugvalues -filetype=obj %s -o - | llvm-dwarfdump - | FileCheck %s
 
 # Based on the following C reproducer:
 #

diff  --git a/llvm/test/DebugInfo/MIR/X86/dbginfo-entryvals.mir b/llvm/test/DebugInfo/MIR/X86/dbginfo-entryvals.mir
index 6c6b4ddb46d7..5d203029936e 100644
--- a/llvm/test/DebugInfo/MIR/X86/dbginfo-entryvals.mir
+++ b/llvm/test/DebugInfo/MIR/X86/dbginfo-entryvals.mir
@@ -1,4 +1,4 @@
-# RUN: llc -run-pass=livedebugvalues -march=x86-64 -o - %s | FileCheck %s
+# RUN: llc -debug-entry-values -run-pass=livedebugvalues -march=x86-64 -o - %s | FileCheck %s
 #
 #extern void fn2(int);
 #

diff  --git a/llvm/test/DebugInfo/MIR/X86/debug-call-site-param.mir b/llvm/test/DebugInfo/MIR/X86/debug-call-site-param.mir
index dfbca43e571f..caee15c2a9e6 100644
--- a/llvm/test/DebugInfo/MIR/X86/debug-call-site-param.mir
+++ b/llvm/test/DebugInfo/MIR/X86/debug-call-site-param.mir
@@ -2,8 +2,8 @@
 # When the debugger tuning is set to gdb, use GNU opcodes.
 # For lldb, use the standard DWARF5 opcodes.
 
-# RUN: llc -debugger-tune=gdb -filetype=obj -mtriple=x86_64-unknown-unknown -start-after=machineverifier -o - %s | llvm-dwarfdump - | FileCheck %s -check-prefixes=CHECK-GNU
-# RUN: llc -debugger-tune=lldb -filetype=obj -mtriple=x86_64-unknown-unknown -start-after=machineverifier -o - %s | llvm-dwarfdump - | FileCheck %s -check-prefixes=CHECK-DWARF5
+# RUN: llc -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
+# RUN: llc -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
 #
 # extern void foo(int *a, int b, int c, int d, int e, int f);
 # extern int getVal();

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
index b37f6557ae68..adc43d96a961 100644
--- a/llvm/test/DebugInfo/MIR/X86/entry-value-of-modified-param.mir
+++ b/llvm/test/DebugInfo/MIR/X86/entry-value-of-modified-param.mir
@@ -1,4 +1,4 @@
-# RUN: llc -run-pass=livedebugvalues -march=x86-64 -o - %s | FileCheck %s
+# RUN: llc -debug-entry-values -run-pass=livedebugvalues -march=x86-64 -o - %s | FileCheck %s
 #
 #extern void fn1 (int, int, int);
 #

diff  --git a/llvm/test/DebugInfo/MIR/X86/entry-values-diamond-bbs.mir b/llvm/test/DebugInfo/MIR/X86/entry-values-diamond-bbs.mir
index f2f02e809522..2396daada876 100644
--- a/llvm/test/DebugInfo/MIR/X86/entry-values-diamond-bbs.mir
+++ b/llvm/test/DebugInfo/MIR/X86/entry-values-diamond-bbs.mir
@@ -1,4 +1,4 @@
-# RUN: llc -run-pass=livedebugvalues -march=x86-64 -o - %s | FileCheck %s
+# RUN: llc -debug-entry-values -run-pass=livedebugvalues -march=x86-64 -o - %s | FileCheck %s
 #
 # The test case was artificially adjusted, in order to make proper diamond basic
 # block structure relevant to the debug entry values propagation.

diff  --git a/llvm/test/DebugInfo/MIR/X86/kill-entry-value-after-diamond-bbs.mir b/llvm/test/DebugInfo/MIR/X86/kill-entry-value-after-diamond-bbs.mir
index 7152080923c3..0109dc47ef36 100644
--- a/llvm/test/DebugInfo/MIR/X86/kill-entry-value-after-diamond-bbs.mir
+++ b/llvm/test/DebugInfo/MIR/X86/kill-entry-value-after-diamond-bbs.mir
@@ -1,4 +1,4 @@
-# RUN: llc -run-pass=livedebugvalues -march=x86-64 -o - %s | FileCheck %s
+# RUN: llc -debug-entry-values -run-pass=livedebugvalues -march=x86-64 -o - %s | FileCheck %s
 #
 # The test case was artificially adjusted, in order to make proper diamond basic
 # block structure relevant to the debug entry values clobbering.

diff  --git a/llvm/test/DebugInfo/MIR/X86/multiple-param-dbg-value-entry.mir b/llvm/test/DebugInfo/MIR/X86/multiple-param-dbg-value-entry.mir
index be3fc00a1b78..fd154ed6a731 100644
--- a/llvm/test/DebugInfo/MIR/X86/multiple-param-dbg-value-entry.mir
+++ b/llvm/test/DebugInfo/MIR/X86/multiple-param-dbg-value-entry.mir
@@ -1,4 +1,4 @@
-# RUN: llc -run-pass=livedebugvalues -march=x86-64 -o - %s| FileCheck %s
+# RUN: llc -debug-entry-values -run-pass=livedebugvalues -march=x86-64 -o - %s| FileCheck %s
 #
 #int global;
 #int foo(int p, int q, int r) {

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
index e24f90ff2706..86b1cddaa462 100644
--- a/llvm/test/DebugInfo/MIR/X86/propagate-entry-value-cross-bbs.mir
+++ b/llvm/test/DebugInfo/MIR/X86/propagate-entry-value-cross-bbs.mir
@@ -1,4 +1,4 @@
-# RUN: llc -run-pass=livedebugvalues -march=x86-64 -o - %s | FileCheck %s
+# RUN: llc -debug-entry-values -run-pass=livedebugvalues -march=x86-64 -o - %s | FileCheck %s
 #
 #extern void fn1 (int, int, int);
 #__attribute__((noinline))

diff  --git a/llvm/test/DebugInfo/MIR/X86/unreachable-block-call-site.mir b/llvm/test/DebugInfo/MIR/X86/unreachable-block-call-site.mir
index 66d799162e04..d282d796f6d7 100644
--- a/llvm/test/DebugInfo/MIR/X86/unreachable-block-call-site.mir
+++ b/llvm/test/DebugInfo/MIR/X86/unreachable-block-call-site.mir
@@ -1,4 +1,4 @@
-# RUN: llc -mtriple=x86_64-pc-linux -run-pass=unreachable-mbb-elimination -o - %s | FileCheck %s
+# RUN: llc -mtriple=x86_64-pc-linux -debug-entry-values -run-pass=unreachable-mbb-elimination -o - %s | FileCheck %s
 
 # Verify that the call site information for the call residing in the eliminated
 # block is removed. This test case would previously trigger an assertion when

diff  --git a/llvm/test/DebugInfo/Sparc/entry-value-complex-reg-expr.ll b/llvm/test/DebugInfo/Sparc/entry-value-complex-reg-expr.ll
index cfe8a3d0da04..0af5619b75d7 100644
--- a/llvm/test/DebugInfo/Sparc/entry-value-complex-reg-expr.ll
+++ b/llvm/test/DebugInfo/Sparc/entry-value-complex-reg-expr.ll
@@ -1,5 +1,3 @@
-; We do not support the call site info for the target now, so we use the experimental option (-debug-entry-values).
-
 ; RUN: llc -debug-entry-values -filetype=asm -o - %s | FileCheck %s
 
 ; Verify that the entry value covers both of the DW_OP_regx pieces. Previously

diff  --git a/llvm/test/DebugInfo/X86/dbg-value-range.ll b/llvm/test/DebugInfo/X86/dbg-value-range.ll
index 9159d2aac780..e0cfe5f15ee9 100644
--- a/llvm/test/DebugInfo/X86/dbg-value-range.ll
+++ b/llvm/test/DebugInfo/X86/dbg-value-range.ll
@@ -56,6 +56,6 @@ declare void @llvm.dbg.value(metadata, metadata, metadata) nounwind readnone
 ;CHECK-NEXT:	.quad	[[CLOBBER_OFF]]
 ;CHECK-NEXT:  .short 1 ## Loc expr size
 ;CHECK-NEXT:	.byte	85 ## DW_OP_reg
-;CHECK:        .quad  0
+;CHECK-NEXT:	.quad	0
 ;CHECK-NEXT:	.quad	0
 !24 = !{i32 1, !"Debug Info Version", i32 3}

diff  --git a/llvm/test/DebugInfo/X86/dbg-value-regmask-clobber.ll b/llvm/test/DebugInfo/X86/dbg-value-regmask-clobber.ll
index 425a6cb38c41..440498a9d8dd 100644
--- a/llvm/test/DebugInfo/X86/dbg-value-regmask-clobber.ll
+++ b/llvm/test/DebugInfo/X86/dbg-value-regmask-clobber.ll
@@ -9,7 +9,8 @@
 ; ASM: movl $1, x(%rip)
 ; ASM: callq clobber
 ; ASM-NEXT: [[argc_range_end:.Ltmp[0-9]+]]:
-; ASM: #DEBUG_VALUE: main:argc <- [DW_OP_LLVM_entry_value 1] $ecx
+; Previously LiveDebugValues would claim argc was still in ecx after the call.
+; ASM-NOT: #DEBUG_VALUE: main:argc
 
 ; argc is the first debug location.
 ; ASM: .Ldebug_loc1:
@@ -22,8 +23,7 @@
 ; DWARF: .debug_info contents:
 ; DWARF:  DW_TAG_formal_parameter
 ; DWARF-NEXT:    DW_AT_location ({{0x.*}}
-; DWARF-NEXT:    [0x0000000000000000, 0x0000000000000013): DW_OP_reg2 RCX
-; DWARF-NEXT:    [0x0000000000000013, 0x0000000000000043): DW_OP_GNU_entry_value(DW_OP_reg2 RCX), DW_OP_stack_value
+; DWARF-NEXT:      [0x0000000000000000, 0x0000000000000013): DW_OP_reg2 RCX)
 ; DWARF-NEXT:    DW_AT_name ("argc")
 
 ; ModuleID = 't.cpp'

diff  --git a/llvm/test/DebugInfo/X86/dbgcall-site-64-bit-imms.ll b/llvm/test/DebugInfo/X86/dbgcall-site-64-bit-imms.ll
index c25d614f9d55..b698f1cdbfe8 100644
--- a/llvm/test/DebugInfo/X86/dbgcall-site-64-bit-imms.ll
+++ b/llvm/test/DebugInfo/X86/dbgcall-site-64-bit-imms.ll
@@ -1,4 +1,4 @@
-; RUN: llc -O1 -filetype=obj -o - %s | llvm-dwarfdump - | FileCheck %s
+; RUN: llc -O1 -debug-entry-values -filetype=obj -o - %s | llvm-dwarfdump - | FileCheck %s
 
 ; Verify that the 64-bit call site immediates are not truncated.
 ;

diff  --git a/llvm/test/DebugInfo/X86/dbgcall-site-zero-valued-imms.ll b/llvm/test/DebugInfo/X86/dbgcall-site-zero-valued-imms.ll
index 1900a6ae0023..9fe67f82a2b4 100644
--- a/llvm/test/DebugInfo/X86/dbgcall-site-zero-valued-imms.ll
+++ b/llvm/test/DebugInfo/X86/dbgcall-site-zero-valued-imms.ll
@@ -1,4 +1,4 @@
-; RUN: llc -O3 -filetype=obj -o - %s | llvm-dwarfdump - | FileCheck %s
+; RUN: llc -O3 -debug-entry-values -filetype=obj -o - %s | llvm-dwarfdump - | FileCheck %s
 
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"

diff  --git a/llvm/test/DebugInfo/X86/loclists-dwp.ll b/llvm/test/DebugInfo/X86/loclists-dwp.ll
index a972c8094c5f..91f838876338 100644
--- a/llvm/test/DebugInfo/X86/loclists-dwp.ll
+++ b/llvm/test/DebugInfo/X86/loclists-dwp.ll
@@ -19,12 +19,10 @@
 ; void b(int i) { asm("" : : : "rdi"); }
 
 ; CHECK:      DW_AT_location [DW_FORM_sec_offset]   (0x00000000
-; CHECK-NEXT: DW_LLE_startx_length (0x0000000000000000, 0x0000000000000006): DW_OP_reg5 RDI
-; CHECK-NEXT: DW_LLE_startx_length (0x0000000000000001, 0x0000000000000002): DW_OP_GNU_entry_value(DW_OP_reg5 RDI), DW_OP_stack_value)
+; CHECK-NEXT: DW_LLE_startx_length (0x0000000000000000, 0x0000000000000006): DW_OP_reg5 RDI)
 
 ; CHECK:      DW_AT_location [DW_FORM_sec_offset]   (0x00000000
-; CHECK-NEXT: DW_LLE_startx_length (0x0000000000000000, 0x0000000000000000): DW_OP_reg5 RDI
-; CHECK-NEXT: DW_LLE_startx_length (0x0000000000000001, 0x0000000000000001): DW_OP_GNU_entry_value(DW_OP_reg5 RDI), DW_OP_stack_value)
+; CHECK-NEXT: DW_LLE_startx_length (0x0000000000000000, 0x0000000000000000): DW_OP_reg5 RDI)
 
 target triple = "x86_64-unknown-linux-gnu"
 

diff  --git a/llvm/test/DebugInfo/X86/no-entry-values-with-O0.ll b/llvm/test/DebugInfo/X86/no-entry-values-with-O0.ll
deleted file mode 100644
index 8ba22b7b6e51..000000000000
--- a/llvm/test/DebugInfo/X86/no-entry-values-with-O0.ll
+++ /dev/null
@@ -1,88 +0,0 @@
-; RUN: llc -O0  -dwarf-version=5 -debugger-tune=lldb -march=x86-64 -filetype=obj < %s \
-; RUN:  | llvm-dwarfdump - | FileCheck --implicit-check-not=DW_OP_entry_value %s
-; RUN: llc -O0  -dwarf-version=5 -debugger-tune=gdb -march=x86-64 -filetype=obj < %s \
-; RUN:  | llvm-dwarfdump - | FileCheck --implicit-check-not=DW_OP_entry_value %s
-
-; The call-site-params are created iff corresponding DISubprogram contains
-; the AllCallsDescribed DIFlag.
-; CHECK-NOT: DW_TAG_call_site_param
-
-; Genarated with:
-; clang -gdwarf-5 -O0 test.c -S -emit-llvm
-;
-; ModuleID = 'test.c'
-target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
-target triple = "x86_64-unknown-linux-gnu"
-
-; Function Attrs: noinline nounwind optnone uwtable
-define dso_local void @fn1(i32 %x, i32 %y) !dbg !7 {
-entry:
-  %x.addr = alloca i32, align 4
-  %y.addr = alloca i32, align 4
-  %u = alloca i32, align 4
-  %a = alloca i32, align 4
-  store i32 %x, i32* %x.addr, align 4
-  call void @llvm.dbg.declare(metadata i32* %x.addr, metadata !11, metadata !DIExpression()), !dbg !12
-  store i32 %y, i32* %y.addr, align 4
-  call void @llvm.dbg.declare(metadata i32* %y.addr, metadata !13, metadata !DIExpression()), !dbg !14
-  call void @llvm.dbg.declare(metadata i32* %u, metadata !15, metadata !DIExpression()), !dbg !16
-  %0 = load i32, i32* %x.addr, align 4, !dbg !16
-  %1 = load i32, i32* %y.addr, align 4, !dbg !16
-  %add = add nsw i32 %0, %1, !dbg !16
-  store i32 %add, i32* %u, align 4, !dbg !16
-  %2 = load i32, i32* %x.addr, align 4, !dbg !17
-  %cmp = icmp sgt i32 %2, 1, !dbg !17
-  br i1 %cmp, label %if.then, label %if.else, !dbg !16
-
-if.then:                                          ; preds = %entry
-  %3 = load i32, i32* %u, align 4, !dbg !17
-  %add1 = add nsw i32 %3, 1, !dbg !17
-  store i32 %add1, i32* %u, align 4, !dbg !17
-  br label %if.end, !dbg !17
-
-if.else:                                          ; preds = %entry
-  %4 = load i32, i32* %u, align 4, !dbg !17
-  %add2 = add nsw i32 %4, 2, !dbg !17
-  store i32 %add2, i32* %u, align 4, !dbg !17
-  br label %if.end
-
-if.end:                                           ; preds = %if.else, %if.then
-  call void @llvm.dbg.declare(metadata i32* %a, metadata !19, metadata !DIExpression()), !dbg !16
-  store i32 7, i32* %a, align 4, !dbg !16
-  %5 = load i32, i32* %a, align 4, !dbg !16
-  call void @fn2(i32 %5), !dbg !16
-  %6 = load i32, i32* %u, align 4, !dbg !16
-  %dec = add nsw i32 %6, -1, !dbg !16
-  store i32 %dec, i32* %u, align 4, !dbg !16
-  ret void, !dbg !16
-}
-
-; Function Attrs: nounwind readnone speculatable willreturn
-declare void @llvm.dbg.declare(metadata, metadata, metadata)
-
-declare dso_local void @fn2(i32)
-
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!3, !4, !5}
-!llvm.ident = !{!6}
-
-!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)
-!1 = !DIFile(filename: "test.c", directory: "/")
-!2 = !{}
-!3 = !{i32 7, !"Dwarf Version", i32 5}
-!4 = !{i32 2, !"Debug Info Version", i32 3}
-!5 = !{i32 1, !"wchar_size", i32 4}
-!6 = !{!"clang version 11.0.0"}
-!7 = distinct !DISubprogram(name: "fn1", scope: !1, file: !1, line: 5, type: !8, scopeLine: 5, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !2)
-!8 = !DISubroutineType(types: !9)
-!9 = !{null, !10, !10}
-!10 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
-!11 = !DILocalVariable(name: "x", arg: 1, scope: !7, file: !1, line: 5, type: !10)
-!12 = !DILocation(line: 5, column: 10, scope: !7)
-!13 = !DILocalVariable(name: "y", arg: 2, scope: !7, file: !1, line: 5, type: !10)
-!14 = !DILocation(line: 5, column: 17, scope: !7)
-!15 = !DILocalVariable(name: "u", scope: !7, file: !1, line: 6, type: !10)
-!16 = !DILocation(line: 6, column: 7, scope: !7)
-!17 = !DILocation(line: 7, column: 7, scope: !18)
-!18 = distinct !DILexicalBlock(scope: !7, file: !1, line: 7, column: 7)
-!19 = !DILocalVariable(name: "a", scope: !7, file: !1, line: 11, type: !10)

diff  --git a/llvm/test/tools/llvm-dwarfdump/X86/locstats.ll b/llvm/test/tools/llvm-dwarfdump/X86/locstats.ll
index ca9140f5fabd..7521806c624f 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/locstats.ll
+++ b/llvm/test/tools/llvm-dwarfdump/X86/locstats.ll
@@ -1,4 +1,4 @@
-; RUN: llc %s -o - -filetype=obj \
+; RUN: llc -debug-entry-values %s -o - -filetype=obj \
 ; RUN:   | llvm-dwarfdump -statistics - | FileCheck %s
 ;
 ; CHECK: "entry value scope bytes covered":5

diff  --git a/llvm/test/tools/llvm-dwarfdump/X86/stats-dbg-callsite-info.ll b/llvm/test/tools/llvm-dwarfdump/X86/stats-dbg-callsite-info.ll
index 8601dc3595f7..c304e9d768a5 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/stats-dbg-callsite-info.ll
+++ b/llvm/test/tools/llvm-dwarfdump/X86/stats-dbg-callsite-info.ll
@@ -1,6 +1,9 @@
-; RUN: llc %s -o - -filetype=obj \
+; RUN: llc -debug-entry-values %s -o - -filetype=obj \
 ; RUN:   | llvm-dwarfdump -statistics - | FileCheck %s
 ;
+; The LLVM IR file was generated on this source code by using
+; option '-femit-debug-entry-values'.
+;
 ; extern void foo(int *a, int b, int c, int d, int e, int f);
 ; extern int getVal();
 ;

diff  --git a/llvm/test/tools/llvm-dwarfdump/X86/valid-call-site-GNU-extensions.ll b/llvm/test/tools/llvm-dwarfdump/X86/valid-call-site-GNU-extensions.ll
index acb875bd0f13..935f3a2d1d35 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/valid-call-site-GNU-extensions.ll
+++ b/llvm/test/tools/llvm-dwarfdump/X86/valid-call-site-GNU-extensions.ll
@@ -1,4 +1,4 @@
-; RUN: llc %s -o - -filetype=obj \
+; RUN: llc -debug-entry-values %s -o - -filetype=obj \
 ; RUN:   | llvm-dwarfdump -verify - | FileCheck %s
 ;
 ; CHECK: No errors.

diff  --git a/llvm/test/tools/llvm-locstats/locstats.ll b/llvm/test/tools/llvm-locstats/locstats.ll
index fd28679f3ec1..f16635d2e8e4 100644
--- a/llvm/test/tools/llvm-locstats/locstats.ll
+++ b/llvm/test/tools/llvm-locstats/locstats.ll
@@ -9,9 +9,9 @@
 ; LOCSTATS: [10%,20%) 0 0%
 ; LOCSTATS: [20%,30%) 1 11%
 ; LOCSTATS: [30%,40%) 0 0%
-; LOCSTATS: [40%,50%) 0 0%
-; LOCSTATS: [50%,60%) 0 0%
-; LOCSTATS: [60%,70%) 3 33%
+; LOCSTATS: [40%,50%) 1 11%
+; LOCSTATS: [50%,60%) 1 11%
+; LOCSTATS: [60%,70%) 1 11%
 ; LOCSTATS: [70%,80%) 0 0%
 ; LOCSTATS: [80%,90%) 2 22%
 ; LOCSTATS: [90%,100%) 1 11%


        


More information about the cfe-commits mailing list