diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp --- a/clang/lib/Driver/ToolChains/Clang.cpp +++ b/clang/lib/Driver/ToolChains/Clang.cpp @@ -6971,11 +6971,6 @@ if (StringRef(Arg->getValue()) == "-finclude-default-header") continue; } - if (StringRef(Arg->getValue()) == "-fexperimental-assignment-tracking") { - // Add the llvm version of this flag too. - CmdArgs.push_back("-mllvm"); - CmdArgs.push_back("-experimental-assignment-tracking"); - } CmdArgs.push_back(Arg->getValue()); } for (const Arg *A : Args.filtered(options::OPT_mllvm)) { diff --git a/clang/test/Driver/assignment-tracking-opts.c b/clang/test/Driver/assignment-tracking-opts.c deleted file mode 100644 --- a/clang/test/Driver/assignment-tracking-opts.c +++ /dev/null @@ -1,10 +0,0 @@ -// RUN: %clang -### -S %s -g -target x86_64-linux-gnu 2>&1 | FileCheck --check-prefix=CHECK-NO-AT %s -// RUN: %clang -### -S %s -g -target x86_64-linux-gnu 2>&1 \ -// RUN: -Xclang -fexperimental-assignment-tracking \ -// RUN: | FileCheck --check-prefix=CHECK-AT %s - -// CHECK-NO-AT-NOT: "-mllvm" "-experimental-assignment-tracking" -// CHECK-NO-AT-NOT: "-fexperimental-assignment-tracking" - -// CHECK-AT: "-mllvm" "-experimental-assignment-tracking" -// CHECK-AT: "-fexperimental-assignment-tracking" diff --git a/llvm/docs/AssignmentTracking.md b/llvm/docs/AssignmentTracking.md --- a/llvm/docs/AssignmentTracking.md +++ b/llvm/docs/AssignmentTracking.md @@ -25,7 +25,11 @@ **Enable in Clang**: `-Xclang -fexperimental-assignment-tracking` -**Enable in LLVM tools**: `-experimental-assignment-tracking` +That causes Clang to get LLVM to run the pass `declare-to-assign`. The pass +converts conventional debug intrinsics to assignment tracking metadata and sets +the module flag `debug-info-assignment-tracking` to the value `i1 true`. To +check whether assignment tracking is enabled for a module call +`isAssignmentTrackingEnabled(const Module &M)` (from `llvm/IR/DebugInfo.h`). ## Design and implementation diff --git a/llvm/include/llvm/IR/DebugInfo.h b/llvm/include/llvm/IR/DebugInfo.h --- a/llvm/include/llvm/IR/DebugInfo.h +++ b/llvm/include/llvm/IR/DebugInfo.h @@ -291,15 +291,20 @@ /// intrinsics by treating stores to the dbg.declare'd address as assignments /// to the variable. Not all kinds of variables are supported yet; those will /// be left with their dbg.declare intrinsics. +/// The pass sets the debug-info-assignment-tracking module flag to true to +/// indicate assignment tracking has been enabled. class AssignmentTrackingPass : public PassInfoMixin { -public: + /// Note: this method does not set the debug-info-assignment-tracking module + /// flag. void runOnFunction(Function &F); + +public: PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM); PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM); }; -/// Return true if assignment tracking is enabled. -bool getEnableAssignmentTracking(); +/// Return true if assignment tracking is enabled for module \p M. +bool isAssignmentTrackingEnabled(const Module &M); } // end namespace llvm #endif // LLVM_IR_DEBUGINFO_H diff --git a/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp b/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp --- a/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp +++ b/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp @@ -2389,6 +2389,9 @@ } bool AssignmentTrackingAnalysis::runOnFunction(Function &F) { + if (!isAssignmentTrackingEnabled(*F.getParent())) + return false; + LLVM_DEBUG(dbgs() << "AssignmentTrackingAnalysis run on " << F.getName() << "\n"); auto DL = std::make_unique(F.getParent()); diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -6090,7 +6090,7 @@ case Intrinsic::dbg_addr: case Intrinsic::dbg_declare: { // Debug intrinsics are handled seperately in assignment tracking mode. - if (getEnableAssignmentTracking()) + if (isAssignmentTrackingEnabled(*I.getFunction()->getParent())) return; // Assume dbg.addr and dbg.declare can not currently use DIArgList, i.e. // they are non-variadic. @@ -6193,13 +6193,13 @@ } case Intrinsic::dbg_assign: { // Debug intrinsics are handled seperately in assignment tracking mode. - assert(getEnableAssignmentTracking() && + assert(isAssignmentTrackingEnabled(*I.getFunction()->getParent()) && "expected assignment tracking to be enabled"); return; } case Intrinsic::dbg_value: { // Debug intrinsics are handled seperately in assignment tracking mode. - if (getEnableAssignmentTracking()) + if (isAssignmentTrackingEnabled(*I.getFunction()->getParent())) return; const DbgValueInst &DI = cast(I); assert(DI.getVariable() && "Missing variable"); diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -345,10 +345,10 @@ if (UseMBPI && OptLevel != CodeGenOpt::None) AU.addRequired(); AU.addRequired(); - if (getEnableAssignmentTracking()) { - AU.addRequired(); - AU.addPreserved(); - } + // AssignmentTrackingAnalysis only runs if assignment tracking is enabled for + // the module. + AU.addRequired(); + AU.addPreserved(); if (OptLevel != CodeGenOpt::None) LazyBlockFrequencyInfoPass::getLazyBFIAnalysisUsage(AU); MachineFunctionPass::getAnalysisUsage(AU); @@ -420,7 +420,7 @@ BFI = &getAnalysis().getBFI(); FunctionVarLocs const *FnVarLocs = nullptr; - if (getEnableAssignmentTracking()) + if (isAssignmentTrackingEnabled(*Fn.getParent())) FnVarLocs = getAnalysis().getResults(); LLVM_DEBUG(dbgs() << "\n\n\n=== " << Fn.getName() << "\n"); @@ -1435,7 +1435,7 @@ if (FastIS && Inserted) FastIS->setLastLocalValue(&*std::prev(FuncInfo->InsertPt)); - if (getEnableAssignmentTracking()) { + if (isAssignmentTrackingEnabled(*Fn.getParent())) { assert(CurDAG->getFunctionVarLocs() && "expected AssignmentTrackingAnalysis pass results"); processSingleLocVars(*FuncInfo, CurDAG->getFunctionVarLocs()); diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp --- a/llvm/lib/IR/DebugInfo.cpp +++ b/llvm/lib/IR/DebugInfo.cpp @@ -43,13 +43,6 @@ using namespace llvm::at; using namespace llvm::dwarf; -static cl::opt - ExperimentalAssignmentTracking("experimental-assignment-tracking", - cl::init(false)); -bool llvm::getEnableAssignmentTracking() { - return ExperimentalAssignmentTracking; -} - /// Finds all intrinsics declaring local variables as living in the memory that /// 'V' points to. This may include a mix of dbg.declare and /// dbg.addr intrinsics. @@ -1959,9 +1952,33 @@ } } +static const char *AssignmentTrackingModuleFlag = + "debug-info-assignment-tracking"; + +static void setAssignmentTrackingModuleFlag(Module &M) { + M.setModuleFlag(Module::ModFlagBehavior::Max, AssignmentTrackingModuleFlag, + ConstantAsMetadata::get( + ConstantInt::get(Type::getInt1Ty(M.getContext()), 1))); +} + +static bool getAssignmentTrackingModuleFlag(const Module &M) { + Metadata *Value = M.getModuleFlag(AssignmentTrackingModuleFlag); + return Value && !cast(Value)->getValue()->isZeroValue(); +} + +bool llvm::isAssignmentTrackingEnabled(const Module &M) { + return getAssignmentTrackingModuleFlag(M); +} + PreservedAnalyses AssignmentTrackingPass::run(Function &F, FunctionAnalysisManager &AM) { runOnFunction(F); + + // Record that this module uses assignment tracking. It doesn't matter that + // some functons in the module may not use it - the debug info in those + // functions will still be handled properly. + setAssignmentTrackingModuleFlag(*F.getParent()); + // Q: Can we return a less conservative set than just CFGAnalyses? Can we // return PreservedAnalyses::all()? PreservedAnalyses PA; @@ -1973,6 +1990,10 @@ ModuleAnalysisManager &AM) { for (auto &F : M) runOnFunction(F); + + // Record that this module uses assignment tracking. + setAssignmentTrackingModuleFlag(M); + // Q: Can we return a less conservative set than just CFGAnalyses? Can we // return PreservedAnalyses::all()? PreservedAnalyses PA; diff --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp --- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp +++ b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp @@ -4604,7 +4604,7 @@ // LowerDbgDeclare calls RemoveRedundantDbgInstrs, but LowerDbgDeclare will // almost never return true when running an assignment tracking build. Take // this opportunity to do some clean up for assignment tracking builds too. - if (!MadeIRChange && getEnableAssignmentTracking()) { + if (!MadeIRChange && isAssignmentTrackingEnabled(*F.getParent())) { for (auto &BB : F) RemoveRedundantDbgInstrs(&BB); } diff --git a/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp b/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp --- a/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp +++ b/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp @@ -531,7 +531,8 @@ // getting (2) out of the way, the foward scan will remove (3) since "x" // already is described as having the value V1 at (1). MadeChanges |= removeRedundantDbgInstrsUsingBackwardScan(BB); - if (BB->isEntryBlock() && getEnableAssignmentTracking()) + if (BB->isEntryBlock() && + isAssignmentTrackingEnabled(*BB->getParent()->getParent())) MadeChanges |= remomveUndefDbgAssignsFromEntryBlock(BB); MadeChanges |= removeRedundantDbgInstrsUsingForwardScan(BB); diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp --- a/llvm/lib/Transforms/Utils/InlineFunction.cpp +++ b/llvm/lib/Transforms/Utils/InlineFunction.cpp @@ -2302,7 +2302,7 @@ fixupLineNumbers(Caller, FirstNewBlock, &CB, CalledFunc->getSubprogram() != nullptr); - if (getEnableAssignmentTracking()) { + if (isAssignmentTrackingEnabled(*Caller->getParent())) { // Interpret inlined stores to caller-local variables as assignments. trackInlinedStores(FirstNewBlock, Caller->end(), CB); diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/adce/no-delete.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/adce/no-delete.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/adce/no-delete.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/adce/no-delete.ll @@ -1,4 +1,4 @@ -; RUN: opt %s -passes=adce -experimental-assignment-tracking -S -o - \ +; RUN: opt %s -passes=adce -S -o - \ ; RUN: | FileCheck %s ;; $ cat test.c @@ -26,7 +26,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!2, !3, !4, !5} +!llvm.module.flags = !{!2, !3, !4, !5, !1000} !llvm.ident = !{!6} !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 14.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None) @@ -46,3 +46,4 @@ !14 = !DILocation(line: 0, scope: !7) !19 = distinct !DIAssignID() !20 = !DILocation(line: 1, column: 22, scope: !7) +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/codegenprepare/sunk-addr.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/codegenprepare/sunk-addr.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/codegenprepare/sunk-addr.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/codegenprepare/sunk-addr.ll @@ -1,6 +1,6 @@ ; REQUIRES: x86-registered-target ; RUN: llc -start-before=codegenprepare -stop-after=codegenprepare \ -; RUN: -mtriple=x86_64-unknown-unknown -experimental-assignment-tracking %s -o - \ +; RUN: -mtriple=x86_64-unknown-unknown %s -o - \ ; RUN: | FileCheck %s --implicit-check-not="call void @llvm.dbg." ;; Check that when CodeGenPrepare moves an address computation to a block it's @@ -39,7 +39,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!3, !4, !5} +!llvm.module.flags = !{!3, !4, !5, !1000} !llvm.ident = !{!6} !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, nameTableKind: None) @@ -58,3 +58,4 @@ !14 = !DILocation(line: 4, column: 15, scope: !7) !20 = distinct !DILexicalBlock(scope: !7, file: !1, line: 8, column: 7) !21 = distinct !DIAssignID() +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/dse/dse-after-memcpyopt-merge.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/dse/dse-after-memcpyopt-merge.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/dse/dse-after-memcpyopt-merge.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/dse/dse-after-memcpyopt-merge.ll @@ -1,4 +1,4 @@ -; RUN: opt %s -S -passes=dse -o - -experimental-assignment-tracking | FileCheck %s +; RUN: opt %s -S -passes=dse -o - | FileCheck %s ;; Observed in the wild, but test is created by running memcpyopt on ;; assignment-tracking/memcpyopt/merge-stores.ll then manually inserting @@ -67,7 +67,7 @@ declare void @llvm.memset.p0i8.i64(ptr nocapture writeonly, i8, i64, i1 immarg) !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!3, !4, !5} +!llvm.module.flags = !{!3, !4, !5, !1000} !llvm.ident = !{!6} !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 12.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None) @@ -133,3 +133,4 @@ !64 = !DISubprogram(name: "esc", linkageName: "_Z3escP1v", scope: !1, file: !1, line: 10, type: !65, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized, retainedNodes: !2) !65 = !DISubroutineType(types: !66) !66 = !{null, !30} +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/dse/shorten.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/dse/shorten.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/dse/shorten.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/dse/shorten.ll @@ -1,4 +1,4 @@ -; RUN: opt %s -S -passes=dse -o - -experimental-assignment-tracking | FileCheck %s +; RUN: opt %s -S -passes=dse -o - | FileCheck %s ;; $ cat test.cpp ;; void esc(int*); @@ -77,7 +77,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!2, !3, !4, !5} +!llvm.module.flags = !{!2, !3, !4, !5, !1000} !llvm.ident = !{!6} !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 14.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None) @@ -126,3 +126,4 @@ !43 = distinct !DIAssignID() !44 = !DILocation(line: 12, column: 3, scope: !31) !45 = !DILocation(line: 13, column: 1, scope: !31) +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/inline/id.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/inline/id.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/inline/id.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/inline/id.ll @@ -1,4 +1,4 @@ -; RUN: opt %s -S -passes=inline -o - -experimental-assignment-tracking \ +; RUN: opt %s -S -passes=inline -o - \ ; RUN: | FileCheck %s ;; Check that all DIAssignID metadata that are inlined are replaced with new @@ -55,7 +55,7 @@ } !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!3, !4, !5} +!llvm.module.flags = !{!3, !4, !5, !1000} !llvm.ident = !{!6} !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 12.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None) @@ -85,3 +85,4 @@ !28 = !DILocation(line: 4, column: 3, scope: !25) !29 = !DILocation(line: 5, column: 3, scope: !25) !30 = !DILocation(line: 6, column: 1, scope: !25) +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/inline/inline-stores.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/inline/inline-stores.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/inline/inline-stores.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/inline/inline-stores.ll @@ -1,4 +1,4 @@ -; RUN: opt -passes=inline %s -S -o - -experimental-assignment-tracking \ +; RUN: opt -passes=inline %s -S -o - \ ; RUN: | FileCheck %s ;; $ cat test.cpp @@ -230,7 +230,7 @@ ; CHECK-DAG: [[ID_6]] = distinct !DIAssignID() !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!3, !4, !5} +!llvm.module.flags = !{!3, !4, !5, !1000} !llvm.ident = !{!6} !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 12.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None) @@ -338,3 +338,4 @@ !106 = !DILocation(line: 39, column: 10, scope: !99) !107 = !DILocation(line: 40, column: 1, scope: !99) !108 = !DILocation(line: 39, column: 3, scope: !99) +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/inline/use-before-def.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/inline/use-before-def.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/inline/use-before-def.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/inline/use-before-def.ll @@ -1,4 +1,4 @@ -; RUN: opt -passes=inline %s -S -o - -experimental-assignment-tracking \ +; RUN: opt -passes=inline %s -S -o - \ ; RUN: | FileCheck %s ;; Hand modified from: @@ -52,7 +52,7 @@ !llvm.dbg.cu = !{!2} -!llvm.module.flags = !{!7, !8, !9} +!llvm.module.flags = !{!7, !8, !9, !1000} !llvm.ident = !{!10} !0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) @@ -77,3 +77,4 @@ !19 = !DILocation(line: 3, column: 15, scope: !16) !24 = !DILocation(line: 0, scope: !16) !25 = !DILocation(line: 4, column: 3, scope: !16) +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/instcombine/alloca-bitcast.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/instcombine/alloca-bitcast.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/instcombine/alloca-bitcast.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/instcombine/alloca-bitcast.ll @@ -1,4 +1,4 @@ -; RUN: opt -opaque-pointers=0 -passes=instcombine -S %s -o - -experimental-assignment-tracking \ +; RUN: opt -opaque-pointers=0 -passes=instcombine -S %s -o - \ ; RUN: | FileCheck %s ;; NOTE: This test uses typed pointers because it is testing a code path that @@ -44,7 +44,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!3, !4, !5} +!llvm.module.flags = !{!3, !4, !5, !1000} !llvm.ident = !{!6} !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 12.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None) @@ -72,3 +72,4 @@ !22 = !DILocation(line: 0, scope: !7) !23 = !DILocation(line: 6, column: 5, scope: !7) !24 = !DILocation(line: 7, column: 3, scope: !7) +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/instcombine/memset.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/instcombine/memset.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/instcombine/memset.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/instcombine/memset.ll @@ -1,4 +1,4 @@ -; RUN: opt %s -S -passes=instcombine -o - -experimental-assignment-tracking \ +; RUN: opt %s -S -passes=instcombine -o - \ ; RUN: | FileCheck %s ;; $ cat test.cpp @@ -43,7 +43,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!2, !3, !4, !5} +!llvm.module.flags = !{!2, !3, !4, !5, !1000} !llvm.ident = !{!6} !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 14.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None) @@ -76,3 +76,4 @@ !27 = !{null, !28} !28 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !13, size: 64) !29 = !{} +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/instcombine/remove-redundant-dbg.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/instcombine/remove-redundant-dbg.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/instcombine/remove-redundant-dbg.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/instcombine/remove-redundant-dbg.ll @@ -1,4 +1,4 @@ -; RUN: opt -passes=instcombine -S %s -o - -experimental-assignment-tracking \ +; RUN: opt -passes=instcombine -S %s -o - \ ; RUN: | FileCheck %s --implicit-check-not="call void @llvm.dbg" ;; Check that instcombine removes redundant debug intrinsics. This has a @@ -21,7 +21,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!2, !3, !4, !5} +!llvm.module.flags = !{!2, !3, !4, !5, !1000} !llvm.ident = !{!6} !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 14.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None) @@ -43,3 +43,4 @@ !16 = !DILocation(line: 2, column: 32, scope: !7) !17 = !DISubprogram(name: "ext", linkageName: "_Z3extv", scope: !1, file: !1, line: 1, type: !8, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized, retainedNodes: !18) !18 = !{} +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/instcombine/sink-store.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/instcombine/sink-store.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/instcombine/sink-store.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/instcombine/sink-store.ll @@ -1,4 +1,4 @@ -; RUN: opt %s -S -passes=instcombine -experimental-assignment-tracking | FileCheck %s +; RUN: opt %s -S -passes=instcombine | FileCheck %s ;; Check that instcombine merges the DIAssignID metadata when merging two ;; stores into a successor. Filecheck directives inline. @@ -66,7 +66,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) !llvm.dbg.cu = !{!2} -!llvm.module.flags = !{!7, !8, !9} +!llvm.module.flags = !{!7, !8, !9, !1000} !llvm.ident = !{!10} !0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) @@ -106,3 +106,4 @@ !38 = !DISubroutineType(types: !39) !39 = !{null, !40} !40 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !6, size: 64) +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/instcombine/sink.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/instcombine/sink.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/instcombine/sink.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/instcombine/sink.ll @@ -1,4 +1,4 @@ -; RUN: opt %s -S -passes=instcombine -o - -experimental-assignment-tracking \ +; RUN: opt %s -S -passes=instcombine -o - \ ; RUN: | FileCheck %s ;; Check that when instcombine sinks an instruction used by a dbg.assign, the @@ -88,7 +88,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) #4 !llvm.dbg.cu = !{!2} -!llvm.module.flags = !{!7, !8, !9} +!llvm.module.flags = !{!7, !8, !9, !1000} !llvm.ident = !{!10} !0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) @@ -140,3 +140,4 @@ !53 = distinct !DIAssignID() !54 = !DILocation(line: 17, column: 3, scope: !35) !55 = !DILocation(line: 18, column: 1, scope: !35) +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/instcombine/storemerge.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/instcombine/storemerge.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/instcombine/storemerge.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/instcombine/storemerge.ll @@ -1,4 +1,4 @@ -; RUN: opt %s -S -passes=instcombine -o - -experimental-assignment-tracking | FileCheck %s +; RUN: opt %s -S -passes=instcombine -o - | FileCheck %s ;; $ cat test.cpp ;; class a { @@ -178,7 +178,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) #3 !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!3, !4, !5} +!llvm.module.flags = !{!3, !4, !5, !1000} !llvm.ident = !{!6} !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 12.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None) @@ -250,3 +250,4 @@ !77 = !DILocation(line: 32, column: 3, scope: !7) !78 = !DILocation(line: 32, column: 5, scope: !7) !79 = !DILocation(line: 33, column: 1, scope: !7) +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/licm/merge.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/licm/merge.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/licm/merge.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/licm/merge.ll @@ -1,4 +1,4 @@ -; RUN: opt -passes=licm %s -S -experimental-assignment-tracking | FileCheck %s +; RUN: opt -passes=licm %s -S | FileCheck %s ;; Ensure that we correctly merge the DIAssignID's from the sunk stores, add it ;; to the new new store instruction, and update the dbg.assign intrinsics using @@ -69,7 +69,7 @@ declare !dbg !28 dso_local void @esc(ptr) !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!3, !4, !5} +!llvm.module.flags = !{!3, !4, !5, !1000} !llvm.ident = !{!6} !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 12.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None) @@ -103,3 +103,4 @@ !36 = distinct !DIAssignID() !37 = distinct !DIAssignID() !38 = distinct !DIAssignID() +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/licm/multi-exit.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/licm/multi-exit.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/licm/multi-exit.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/licm/multi-exit.ll @@ -1,4 +1,4 @@ -; RUN: opt %s -S -passes=licm -o - -experimental-assignment-tracking | FileCheck %s +; RUN: opt %s -S -passes=licm -o - | FileCheck %s ;; $ cat test.c ;; int b, c, d; @@ -112,7 +112,7 @@ declare void @llvm.dbg.value(metadata, metadata, metadata) #1 !llvm.dbg.cu = !{!2} -!llvm.module.flags = !{!11, !12, !13} +!llvm.module.flags = !{!11, !12, !13, !1000} !llvm.ident = !{!14} !0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) @@ -178,3 +178,4 @@ !64 = !DISubprogram(name: "e", scope: !3, file: !3, line: 2, type: !65, spFlags: DISPFlagOptimized, retainedNodes: !4) !65 = !DISubroutineType(types: !66) !66 = !{null, null} +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/loop-deletion/dead-loop.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/loop-deletion/dead-loop.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/loop-deletion/dead-loop.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/loop-deletion/dead-loop.ll @@ -1,4 +1,4 @@ -; RUN: opt %s -passes=loop-deletion -S -o - -experimental-assignment-tracking \ +; RUN: opt %s -passes=loop-deletion -S -o - \ ; RUN: | FileCheck %s ;; $ cat test.cpp: @@ -44,7 +44,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!2, !3, !4, !5} +!llvm.module.flags = !{!2, !3, !4, !5, !1000} !llvm.ident = !{!6} !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 14.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None) @@ -77,3 +77,4 @@ !31 = !{null, !32} !32 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !12, size: 64) !33 = !{} +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/mem2reg/phi.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/mem2reg/phi.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/mem2reg/phi.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/mem2reg/phi.ll @@ -1,4 +1,4 @@ -; RUN: opt -passes=mem2reg -S %s -o - -experimental-assignment-tracking \ +; RUN: opt -passes=mem2reg -S %s -o - \ ; RUN: | FileCheck %s --implicit-check-not="call void @llvm.dbg" ;; Test assignment tracking debug info when mem2reg promotes an alloca with @@ -64,7 +64,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!2, !3, !4, !5} +!llvm.module.flags = !{!2, !3, !4, !5, !1000} !llvm.ident = !{!6} !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 14.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None) @@ -94,3 +94,4 @@ !28 = !DILocation(line: 6, column: 10, scope: !7) !29 = !DILocation(line: 6, column: 3, scope: !7) !30 = !DILocalVariable(name: "b", arg: 2, scope: !7, file: !1, line: 1, type: !10) +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/mem2reg/single-block-alloca.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/mem2reg/single-block-alloca.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/mem2reg/single-block-alloca.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/mem2reg/single-block-alloca.ll @@ -1,4 +1,4 @@ -; RUN: opt -passes=mem2reg -S %s -o - -experimental-assignment-tracking \ +; RUN: opt -passes=mem2reg -S %s -o - \ ; RUN: | FileCheck %s --implicit-check-not="call void @llvm.dbg" ;; Test assignment tracking debug info when mem2reg promotes a single-block @@ -40,7 +40,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!2, !3, !4, !5} +!llvm.module.flags = !{!2, !3, !4, !5, !1000} !llvm.ident = !{!6} !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 14.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None) @@ -64,3 +64,4 @@ !22 = !DILocation(line: 3, column: 10, scope: !7) !23 = !DILocation(line: 3, column: 3, scope: !7) !24 = !DILocalVariable(name: "b", scope: !7, file: !1, line: 1, type: !10) +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/mem2reg/single-store-alloca.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/mem2reg/single-store-alloca.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/mem2reg/single-store-alloca.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/mem2reg/single-store-alloca.ll @@ -1,4 +1,4 @@ -; RUN: opt -passes=mem2reg -S %s -o - -experimental-assignment-tracking \ +; RUN: opt -passes=mem2reg -S %s -o - \ ; RUN: | FileCheck %s --implicit-check-not="call void @llvm.dbg" ;; Test assignment tracking debug info when mem2reg promotes a single-store @@ -38,7 +38,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!2, !3, !4, !5} +!llvm.module.flags = !{!2, !3, !4, !5, !1000} !llvm.ident = !{!6} !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 14.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None) @@ -60,3 +60,4 @@ !20 = !DILocation(line: 1, column: 23, scope: !7) !21 = !DILocation(line: 1, column: 16, scope: !7) !22 = !DILocalVariable(name: "b", scope: !7, file: !1, line: 1, type: !10) +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/memcpyopt/merge-stores.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/memcpyopt/merge-stores.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/memcpyopt/merge-stores.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/memcpyopt/merge-stores.ll @@ -1,4 +1,4 @@ -; RUN: opt %s -S -passes=memcpyopt -o - -experimental-assignment-tracking | FileCheck %s +; RUN: opt %s -S -passes=memcpyopt -o - | FileCheck %s ;; $ cat test.cpp ;; struct v { @@ -85,7 +85,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!3, !4, !5} +!llvm.module.flags = !{!3, !4, !5, !1000} !llvm.ident = !{!6} !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 12.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None) @@ -157,3 +157,4 @@ !70 = !DISubprogram(name: "esc", linkageName: "_Z3escP1v", scope: !1, file: !1, line: 10, type: !71, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized, retainedNodes: !2) !71 = !DISubroutineType(types: !72) !72 = !{null, !30} +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/mldst-motion/diamond.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/mldst-motion/diamond.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/mldst-motion/diamond.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/mldst-motion/diamond.ll @@ -1,4 +1,4 @@ -; RUN: opt -passes=mldst-motion -S %s -o - -experimental-assignment-tracking \ +; RUN: opt -passes=mldst-motion -S %s -o - \ ; RUN: | FileCheck %s ;; $ cat test.cpp @@ -63,7 +63,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) !llvm.dbg.cu = !{!2} -!llvm.module.flags = !{!6, !7, !8, !9} +!llvm.module.flags = !{!6, !7, !8, !9, !1000} !llvm.ident = !{!10} !0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) @@ -105,3 +105,4 @@ !40 = !{null, !41} !41 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !5, size: 64) !42 = !{} +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/parse-and-verify/distinct.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/parse-and-verify/distinct.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/parse-and-verify/distinct.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/parse-and-verify/distinct.ll @@ -1,4 +1,4 @@ -; RUN: not opt -S %s -experimental-assignment-tracking 2>&1 \ +; RUN: not opt -S %s 2>&1 \ ; RUN: | FileCheck %s ;; Check that badly formed assignment tracking metadata is caught either @@ -7,3 +7,4 @@ ; CHECK: error: missing 'distinct', required for !DIAssignID() !1 = !DIAssignID() +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/parse-and-verify/instruction-type.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/parse-and-verify/instruction-type.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/parse-and-verify/instruction-type.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/parse-and-verify/instruction-type.ll @@ -1,4 +1,4 @@ -; RUN: opt -S %s -passes=verify -experimental-assignment-tracking 2>&1 \ +; RUN: opt -S %s -passes=verify 2>&1 \ ; RUN: | FileCheck %s ;; NOTE: Expect opt to return zero because the badly formed debug info @@ -20,7 +20,7 @@ } !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!3, !4, !5} +!llvm.module.flags = !{!3, !4, !5, !1000} !llvm.ident = !{!6} !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 14.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None) @@ -34,3 +34,4 @@ !8 = !DISubroutineType(types: !9) !9 = !{null} !14 = distinct !DIAssignID() +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/parse-and-verify/operands.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/parse-and-verify/operands.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/parse-and-verify/operands.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/parse-and-verify/operands.ll @@ -1,4 +1,4 @@ -; RUN: not opt -S %s -experimental-assignment-tracking 2>&1 \ +; RUN: not opt -S %s 2>&1 \ ; RUN: | FileCheck %s ;; Check that badly formed assignment tracking metadata is caught either @@ -7,3 +7,4 @@ ; CHECK: error: expected ')' here !1 = distinct !DIAssignID(0) +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/parse-and-verify/roundtrip.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/parse-and-verify/roundtrip.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/parse-and-verify/roundtrip.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/parse-and-verify/roundtrip.ll @@ -1,5 +1,5 @@ -; RUN: opt %s -passes=verify -experimental-assignment-tracking \ -; RUN: | opt -passes=verify -S -experimental-assignment-tracking \ +; RUN: opt %s -passes=verify \ +; RUN: | opt -passes=verify -S \ ; RUN: | FileCheck %s ;; Roundtrip test (text -> bitcode -> text) for DIAssignID metadata and @@ -78,7 +78,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!3, !4, !5} +!llvm.module.flags = !{!3, !4, !5, !1000} !llvm.ident = !{!6} !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 14.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None) @@ -113,3 +113,4 @@ !30 = distinct !DIAssignID() !31 = !DISubroutineType(types: !32) !32 = !{null, !11} +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/parse-and-verify/verify.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/parse-and-verify/verify.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/parse-and-verify/verify.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/parse-and-verify/verify.ll @@ -1,4 +1,4 @@ -; RUN: opt %s -S -passes=verify -experimental-assignment-tracking 2>&1 \ +; RUN: opt %s -S -passes=verify 2>&1 \ ; RUN: | FileCheck %s ;; Check that badly formed assignment tracking metadata is caught either @@ -43,7 +43,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!3, !4, !5} +!llvm.module.flags = !{!3, !4, !5, !1000} !llvm.ident = !{!6} !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 14.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None) @@ -61,3 +61,4 @@ !13 = !DILocation(line: 1, column: 1, scope: !7) !14 = distinct !DIAssignID() !15 = distinct !DISubprogram(name: "fun2", scope: !1, file: !1, line: 1, type: !8, scopeLine: 1, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !2) +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/remove-redundant-fwd-scan-linked.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/remove-redundant-fwd-scan-linked.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/remove-redundant-fwd-scan-linked.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/remove-redundant-fwd-scan-linked.ll @@ -1,4 +1,4 @@ -; RUN: opt -passes=redundant-dbg-inst-elim -S %s -o - -experimental-assignment-tracking \ +; RUN: opt -passes=redundant-dbg-inst-elim -S %s -o - \ ; RUN: | FileCheck %s --implicit-check-not="call void @llvm.dbg" ;; $ cat -n reduce.c @@ -83,7 +83,7 @@ declare void @llvm.memset.p0i8.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4 !llvm.dbg.cu = !{!2} -!llvm.module.flags = !{!6, !7, !8, !9, !10} +!llvm.module.flags = !{!6, !7, !8, !9, !10, !1000} !llvm.ident = !{!11} !0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) @@ -129,3 +129,4 @@ !46 = !DILocation(line: 18, scope: !12) !47 = !DISubprogram(name: "ext", scope: !3, file: !3, line: 1, type: !13, spFlags: DISPFlagOptimized, retainedNodes: !48) !48 = !{} +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/remove-redundant.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/remove-redundant.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/remove-redundant.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/remove-redundant.ll @@ -1,4 +1,4 @@ -; RUN: opt -passes=redundant-dbg-inst-elim -S %s -o - -experimental-assignment-tracking \ +; RUN: opt -passes=redundant-dbg-inst-elim -S %s -o - \ ; RUN: | FileCheck %s --implicit-check-not="call void @llvm.dbg" ;; Hand-written. Test how RemoveRedundantDbgInstrs interacts with dbg.assign @@ -92,7 +92,7 @@ declare void @llvm.dbg.value(metadata, metadata, metadata) !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!2, !3, !4, !5} +!llvm.module.flags = !{!2, !3, !4, !5, !1000} !llvm.ident = !{!6} !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 14.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None) @@ -117,3 +117,4 @@ !19 = !DILocalVariable(name: "Local2", scope: !7, file: !1, line: 2, type: !12) !20 = distinct !DIAssignID() !21 = distinct !DIAssignID() +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/salvage-value.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/salvage-value.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/salvage-value.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/salvage-value.ll @@ -1,4 +1,4 @@ -; RUN: opt %s -S -o - -passes=instcombine -experimental-assignment-tracking \ +; RUN: opt %s -S -o - -passes=instcombine \ ; RUN: | FileCheck %s --implicit-check-not="call void @llvm.dbg" ;; Hand-written (the debug info doesn't necessarily make sense and isn't fully @@ -40,7 +40,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!2, !3, !4, !5} +!llvm.module.flags = !{!2, !3, !4, !5, !1000} !llvm.ident = !{!6} !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 14.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None) @@ -71,3 +71,4 @@ !33 = !DILocalVariable(name: "Local2", scope: !7, file: !1, line: 3, type: !10) !34 = !DILocalVariable(name: "Local3", scope: !7, file: !1, line: 3, type: !10) !35 = !DILocalVariable(name: "Local4", scope: !7, file: !1, line: 3, type: !10) +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/simplifycfg/empty-block.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/simplifycfg/empty-block.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/simplifycfg/empty-block.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/simplifycfg/empty-block.ll @@ -1,4 +1,4 @@ -; RUN: opt -S %s -passes=simplifycfg -o - -experimental-assignment-tracking \ +; RUN: opt -S %s -passes=simplifycfg -o - \ ; RUN: | FileCheck %s ;; $ cat test.cpp @@ -80,7 +80,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) #3 !llvm.dbg.cu = !{!2} -!llvm.module.flags = !{!7, !8, !9} +!llvm.module.flags = !{!7, !8, !9, !1000} !llvm.ident = !{!10} !0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) @@ -130,3 +130,4 @@ !50 = !DISubroutineType(types: !51) !51 = !{null, !19, !52} !52 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !23, size: 64) +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/simplifycfg/speculated-store.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/simplifycfg/speculated-store.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/simplifycfg/speculated-store.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/simplifycfg/speculated-store.ll @@ -1,4 +1,4 @@ -; RUN: opt -passes=simplifycfg %s -S -experimental-assignment-tracking \ +; RUN: opt -passes=simplifycfg %s -S \ ; RUN: | FileCheck %s ;; Ensure that we correctly update the value component of dbg.assign intrinsics @@ -55,7 +55,7 @@ declare void @llvm.lifetime.end.p0i8(i64 immarg, ptr nocapture) !llvm.dbg.cu = !{!2} -!llvm.module.flags = !{!7, !8, !9} +!llvm.module.flags = !{!7, !8, !9, !1000} !llvm.ident = !{!10} !0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) @@ -84,3 +84,4 @@ !27 = !DILocation(line: 6, column: 1, scope: !11) !36 = distinct !DIAssignID() !37 = distinct !DIAssignID() +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/slp-vectorizer/merge-scalars.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/slp-vectorizer/merge-scalars.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/slp-vectorizer/merge-scalars.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/slp-vectorizer/merge-scalars.ll @@ -1,5 +1,5 @@ ; REQUIRES: x86-registered-target -; RUN: opt -passes=slp-vectorizer -S -o - %s -experimental-assignment-tracking \ +; RUN: opt -passes=slp-vectorizer -S -o - %s \ ; RUN: | FileCheck %s ;; $ cat test.cpp @@ -71,7 +71,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) #3 !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!3, !4, !5} +!llvm.module.flags = !{!3, !4, !5, !1000} !llvm.ident = !{!6} !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 12.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None) @@ -140,3 +140,4 @@ !67 = !DISubroutineType(types: !68) !68 = !{!10, !69} !69 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !10, size: 64) +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/after-inlining.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/after-inlining.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/after-inlining.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/after-inlining.ll @@ -1,4 +1,4 @@ -; RUN: opt %s -S -passes=sroa -o - -experimental-assignment-tracking | FileCheck %s +; RUN: opt %s -S -passes=sroa -o - | FileCheck %s ;; Check that SROA preserves the InlinedAt status of new dbg.assign intriniscs ;; it inserts. @@ -59,7 +59,7 @@ } !llvm.dbg.cu = !{!2} -!llvm.module.flags = !{!11, !12, !13} +!llvm.module.flags = !{!11, !12, !13, !1000} !llvm.ident = !{!14} !0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) @@ -142,3 +142,4 @@ !81 = !DILocation(line: 14, column: 5, scope: !40, inlinedAt: !79) !82 = !DILocation(line: 20, column: 1, scope: !60, inlinedAt: !76) !83 = !DILocation(line: 21, column: 17, scope: !73) +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/alloca-single-slice.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/alloca-single-slice.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/alloca-single-slice.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/alloca-single-slice.ll @@ -1,4 +1,4 @@ -; RUN: opt -passes=sroa,verify -S %s -o - -experimental-assignment-tracking \ +; RUN: opt -passes=sroa,verify -S %s -o - \ ; RUN: | FileCheck %s --implicit-check-not="call void @llvm.dbg" ; Check that single sliced allocas retain their assignment tracking debug info. @@ -47,7 +47,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) !llvm.dbg.cu = !{!2} -!llvm.module.flags = !{!7, !8, !9} +!llvm.module.flags = !{!7, !8, !9, !1000} !llvm.ident = !{!10} !0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) @@ -80,3 +80,4 @@ !27 = !DILocation(line: 7, column: 3, scope: !11) !28 = !DILocation(line: 7, column: 18, scope: !11) !33 = !DILocation(line: 8, column: 1, scope: !11) +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/complex.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/complex.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/complex.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/complex.ll @@ -1,4 +1,4 @@ -; RUN: opt -passes=sroa -S -o - %s -experimental-assignment-tracking | FileCheck %s +; RUN: opt -passes=sroa -S -o - %s | FileCheck %s ; ;; Based on llvm/test/DebugInfo/ARM/sroa-complex.ll ;; generated from: @@ -43,7 +43,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!3, !4, !5, !6} +!llvm.module.flags = !{!3, !4, !5, !6, !1000} !llvm.ident = !{!7} !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 12.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None) @@ -67,3 +67,4 @@ !18 = distinct !DIAssignID() !19 = distinct !DIAssignID() !20 = !DILocation(line: 2, column: 36, scope: !8) +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/frag-2.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/frag-2.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/frag-2.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/frag-2.ll @@ -1,4 +1,4 @@ -; RUN: opt -passes=sroa -S %s -o - -experimental-assignment-tracking | FileCheck %s +; RUN: opt -passes=sroa -S %s -o - | FileCheck %s ;; $ cat test.cpp ;; class a { @@ -159,7 +159,7 @@ declare void @llvm.lifetime.end.p0i8(i64 immarg, ptr nocapture) #1 !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!3, !4, !5} +!llvm.module.flags = !{!3, !4, !5, !1000} !llvm.ident = !{!6} !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 12.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None) @@ -258,3 +258,4 @@ !100 = !DILocation(line: 24, column: 1, scope: !57) !101 = !DILocation(line: 9, column: 19, scope: !93) !102 = !DILocation(line: 9, column: 12, scope: !93) +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/frag.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/frag.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/frag.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/frag.ll @@ -1,4 +1,4 @@ -; RUN: opt %s -S -passes=sroa -o - -experimental-assignment-tracking | FileCheck %s +; RUN: opt %s -S -passes=sroa -o - | FileCheck %s ;; $ cat test.cpp ;; class c { @@ -75,7 +75,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) #2 !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!3, !4, !5} +!llvm.module.flags = !{!3, !4, !5, !1000} !llvm.ident = !{!6} !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 12.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None) @@ -111,3 +111,4 @@ !34 = !DISubprogram(name: "fn1", linkageName: "_Z3fn1v", scope: !1, file: !1, line: 4, type: !35, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized, retainedNodes: !2) !35 = !DISubroutineType(types: !36) !36 = !{!13} +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/id.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/id.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/id.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/id.ll @@ -1,4 +1,4 @@ -; RUN: opt -passes=sroa -S %s -o - -experimental-assignment-tracking | FileCheck %s +; RUN: opt -passes=sroa -S %s -o - | FileCheck %s ;; Check that multiple dbg.assign intrinsics linked to a store that is getting ;; split (or at least that is touched by SROA, causing a replacement store to @@ -104,7 +104,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) #3 !llvm.dbg.cu = !{!2} -!llvm.module.flags = !{!12, !13, !14} +!llvm.module.flags = !{!12, !13, !14, !1000} !llvm.ident = !{!15} !0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) @@ -172,3 +172,4 @@ !68 = distinct !DIAssignID() !69 = distinct !DIAssignID() !70 = !DILocation(line: 3, column: 20, scope: !42) +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/memcpy.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/memcpy.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/memcpy.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/memcpy.ll @@ -1,4 +1,4 @@ -; RUN: opt -passes=sroa,verify -S %s -o - -experimental-assignment-tracking \ +; RUN: opt -passes=sroa,verify -S %s -o - \ ; RUN: | FileCheck %s --implicit-check-not="call void @llvm.dbg" ;; Check that the new slices of an alloca and memcpy intructions get dbg.assign @@ -79,7 +79,7 @@ !llvm.dbg.cu = !{!2} -!llvm.module.flags = !{!16, !17, !18} +!llvm.module.flags = !{!16, !17, !18, !1000} !llvm.ident = !{!19} !0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) @@ -115,3 +115,4 @@ !35 = !DILocation(line: 9, column: 13, scope: !20) !38 = !DILocation(line: 10, column: 1, scope: !20) !39 = !DILocation(line: 9, column: 3, scope: !20) +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/memmove-to-from-same-alloca.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/memmove-to-from-same-alloca.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/memmove-to-from-same-alloca.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/memmove-to-from-same-alloca.ll @@ -1,4 +1,4 @@ -; RUN: opt %s -passes=sroa -o - -S -experimental-assignment-tracking \ +; RUN: opt %s -passes=sroa -o - -S \ ; RUN: | FileCheck %s ;; Generated from this C++ source: @@ -112,7 +112,7 @@ !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!2, !3, !4, !5, !6, !7} +!llvm.module.flags = !{!2, !3, !4, !5, !6, !7, !1000} !llvm.ident = !{!8} !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 16.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None) @@ -161,3 +161,4 @@ !49 = !DILocation(line: 23, column: 27, scope: !41) !50 = !DILocation(line: 23, column: 5, scope: !41) !51 = !DILocation(line: 24, column: 1, scope: !9) +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/rewrite.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/rewrite.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/rewrite.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/rewrite.ll @@ -1,4 +1,4 @@ -; RUN: opt -passes=sroa,verify -S %s -experimental-assignment-tracking -o - \ +; RUN: opt -passes=sroa,verify -S %s -o - \ ; RUN: | FileCheck %s --implicit-check-not="call void @llvm.dbg" ; Check that the new slices of an alloca and memset intructions get dbg.assign @@ -85,7 +85,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) #3 !llvm.dbg.cu = !{!2} -!llvm.module.flags = !{!10, !11, !12} +!llvm.module.flags = !{!10, !11, !12, !1000} !llvm.ident = !{!13} !0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) @@ -128,3 +128,4 @@ !43 = !DILocation(line: 12, column: 12, scope: !14) !44 = !DILocation(line: 13, column: 1, scope: !14) !45 = !DILocation(line: 12, column: 3, scope: !14) +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/store.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/store.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/store.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/store.ll @@ -1,4 +1,4 @@ -; RUN: opt -passes=sroa,verify -S %s -o - -experimental-assignment-tracking \ +; RUN: opt -passes=sroa,verify -S %s -o - \ ; RUN: | FileCheck %s --implicit-check-not="call void @llvm.dbg" ; Check that the new slices of an alloca and memset intructions get dbg.assign @@ -100,7 +100,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) #4 !llvm.dbg.cu = !{!2} -!llvm.module.flags = !{!10, !11, !12} +!llvm.module.flags = !{!10, !11, !12, !1000} !llvm.ident = !{!13} !0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) @@ -148,3 +148,4 @@ !49 = !DISubprogram(name: "use", linkageName: "_Z3use11LargeStruct", scope: !3, file: !3, line: 9, type: !50, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized, retainedNodes: !4) !50 = !DISubroutineType(types: !51) !51 = !{!9, !19} +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/unspecified-var-size.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/unspecified-var-size.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/unspecified-var-size.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/unspecified-var-size.ll @@ -1,4 +1,4 @@ -; RUN: opt -S %s -passes=sroa -o - -experimental-assignment-tracking | FileCheck %s +; RUN: opt -S %s -passes=sroa -o - | FileCheck %s ;; $ cat test.cpp ;; #include @@ -23,7 +23,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) #1 !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!10, !11, !12} +!llvm.module.flags = !{!10, !11, !12, !1000} !llvm.ident = !{!13} !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 12.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, imports: !3, splitDebugInlining: false, nameTableKind: None) @@ -52,3 +52,4 @@ !23 = !DILocation(line: 0, scope: !14) !28 = distinct !DIAssignID() !29 = !DILocation(line: 20, column: 27, scope: !14) +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/user-memcpy.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/user-memcpy.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/user-memcpy.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/user-memcpy.ll @@ -1,4 +1,4 @@ -; RUN: opt -passes=sroa -S %s -o - -experimental-assignment-tracking \ +; RUN: opt -passes=sroa -S %s -o - \ ; RUN: | FileCheck %s --implicit-check-not="call void @llvm.dbg" ;; Check that the fragments generated in SROA for a split alloca that has a @@ -101,7 +101,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!96, !97, !98} +!llvm.module.flags = !{!96, !97, !98, !1000} !llvm.ident = !{!99} !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 12.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, imports: !3, splitDebugInlining: false, nameTableKind: None) @@ -233,3 +233,4 @@ !131 = !DILocation(line: 8, column: 32, scope: !100) !132 = distinct !DIAssignID() !133 = !DILocation(line: 9, column: 1, scope: !100) +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/vec-1.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/vec-1.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/vec-1.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/vec-1.ll @@ -1,4 +1,4 @@ -; RUN: opt %s -S -passes=sroa -o - -experimental-assignment-tracking | FileCheck %s +; RUN: opt %s -S -passes=sroa -o - | FileCheck %s ;; Ensure that only the value-expression gets fragment info; that the ;; address-expression remains untouched. @@ -61,7 +61,7 @@ !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!3, !4, !5} +!llvm.module.flags = !{!3, !4, !5, !1000} !llvm.ident = !{!6} !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 12.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None) @@ -102,3 +102,4 @@ !39 = distinct !DIAssignID() !40 = distinct !DIAssignID() !41 = !DILocation(line: 8, column: 36, scope: !7) +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/vec-2.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/vec-2.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/vec-2.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/vec-2.ll @@ -1,4 +1,4 @@ -; RUN: opt %s -S -passes=sroa -o - -experimental-assignment-tracking | FileCheck %s +; RUN: opt %s -S -passes=sroa -o - | FileCheck %s ;; $ cat test.cpp ;; class a { @@ -115,7 +115,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) #4 !llvm.dbg.cu = !{!2} -!llvm.module.flags = !{!7, !8, !9} +!llvm.module.flags = !{!7, !8, !9, !1000} !llvm.ident = !{!10} !0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) @@ -204,3 +204,4 @@ !87 = !DILocation(line: 8, column: 14, scope: !64) !88 = !DILocation(line: 8, column: 19, scope: !57) +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/Generic/assignment-tracking/track-assignments.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/track-assignments.ll --- a/llvm/test/DebugInfo/Generic/assignment-tracking/track-assignments.ll +++ b/llvm/test/DebugInfo/Generic/assignment-tracking/track-assignments.ll @@ -1,4 +1,4 @@ -; RUN: opt -passes='declare-to-assign,verify' %s -S -o - -experimental-assignment-tracking \ +; RUN: opt -passes='declare-to-assign,verify' %s -S -o - \ ; RUN: | FileCheck %s --implicit-check-not="call void @llvm.dbg" ;; This test checks that `trackAssignments` is working correctly by using the @@ -337,7 +337,7 @@ declare dso_local void @_ZN9LCopyCtorC1Ev(ptr noundef nonnull align 4 dereferenceable(16)) unnamed_addr !llvm.dbg.cu = !{!2} -!llvm.module.flags = !{!26, !27, !28, !29} +!llvm.module.flags = !{!26, !27, !28, !29, !1000} !llvm.ident = !{!30} ; CHECK-DAG: ![[VAR_0]] = !DILocalVariable(name: "Z", @@ -503,3 +503,4 @@ !146 = !DILocation(line: 2, column: 29, scope: !129, inlinedAt: !144) !147 = !DILocation(line: 2, column: 27, scope: !129, inlinedAt: !144) !148 = !DILocation(line: 3, column: 18, scope: !139) +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/DSE.ll b/llvm/test/DebugInfo/assignment-tracking/X86/DSE.ll --- a/llvm/test/DebugInfo/assignment-tracking/X86/DSE.ll +++ b/llvm/test/DebugInfo/assignment-tracking/X86/DSE.ll @@ -1,5 +1,4 @@ ; RUN: llc %s -stop-before=finalize-isel -o - \ -; RUN: -experimental-assignment-tracking \ ; RUN: | FileCheck %s ; Check basic lowering behaviour of dbg.assign intrinsics. The first @@ -39,7 +38,7 @@ declare !dbg !26 dso_local void @esc(ptr) local_unnamed_addr !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!3, !4, !5} +!llvm.module.flags = !{!3, !4, !5, !1000} !llvm.ident = !{!6} !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 12.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None) @@ -70,3 +69,4 @@ !30 = distinct !DIAssignID() !31 = distinct !DIAssignID() +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/dbg-phi-produces-undef.ll b/llvm/test/DebugInfo/assignment-tracking/X86/dbg-phi-produces-undef.ll --- a/llvm/test/DebugInfo/assignment-tracking/X86/dbg-phi-produces-undef.ll +++ b/llvm/test/DebugInfo/assignment-tracking/X86/dbg-phi-produces-undef.ll @@ -1,4 +1,4 @@ -; RUN: llc %s -stop-after=finalize-isel -o - -experimental-assignment-tracking \ +; RUN: llc %s -stop-after=finalize-isel -o - \ ; RUN: | FileCheck %s ;; Hand written test because the scenario is unlikely. Check that the "value" @@ -72,7 +72,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) #3 !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!3, !4, !5} +!llvm.module.flags = !{!3, !4, !5, !1000} !llvm.ident = !{!6} !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 12.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None) @@ -104,3 +104,4 @@ !29 = !{null, !30} !30 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !12, size: 64) !31 = distinct !DIAssignID() +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/diamond-1.ll b/llvm/test/DebugInfo/assignment-tracking/X86/diamond-1.ll --- a/llvm/test/DebugInfo/assignment-tracking/X86/diamond-1.ll +++ b/llvm/test/DebugInfo/assignment-tracking/X86/diamond-1.ll @@ -1,4 +1,4 @@ -; RUN: llc %s -stop-after=finalize-isel -o - -experimental-assignment-tracking \ +; RUN: llc %s -stop-after=finalize-isel -o - \ ; RUN: | FileCheck %s ;; cat test.cpp @@ -80,7 +80,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) #2 !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!2, !3, !4, !5} +!llvm.module.flags = !{!2, !3, !4, !5, !1000} !llvm.ident = !{!6} !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 14.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None) @@ -121,3 +121,4 @@ !39 = !DISubroutineType(types: !40) !40 = !{null, !41} !41 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !10, size: 64) +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/diamond-2.ll b/llvm/test/DebugInfo/assignment-tracking/X86/diamond-2.ll --- a/llvm/test/DebugInfo/assignment-tracking/X86/diamond-2.ll +++ b/llvm/test/DebugInfo/assignment-tracking/X86/diamond-2.ll @@ -1,4 +1,4 @@ -; RUN: llc %s -stop-after=finalize-isel -o - -experimental-assignment-tracking \ +; RUN: llc %s -stop-after=finalize-isel -o - \ ; RUN: | FileCheck %s ;; Same as diamond-1.ll except that the DIAssignID attached to the store has @@ -68,7 +68,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) #2 !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!2, !3, !4, !5} +!llvm.module.flags = !{!2, !3, !4, !5, !1000} !llvm.ident = !{!6} !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 14.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None) @@ -109,3 +109,4 @@ !39 = !DISubroutineType(types: !40) !40 = !{null, !41} !41 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !10, size: 64) +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/diamond-3.ll b/llvm/test/DebugInfo/assignment-tracking/X86/diamond-3.ll --- a/llvm/test/DebugInfo/assignment-tracking/X86/diamond-3.ll +++ b/llvm/test/DebugInfo/assignment-tracking/X86/diamond-3.ll @@ -1,4 +1,4 @@ -; RUN: llc %s -stop-after=finalize-isel -o - -experimental-assignment-tracking \ +; RUN: llc %s -stop-after=finalize-isel -o - \ ; RUN: | FileCheck %s --implicit-check-not=DBG_ ;; Hand written to test scenario we can definitely run into in the wild. This @@ -63,7 +63,7 @@ declare void @es(ptr) !llvm.dbg.cu = !{!2} -!llvm.module.flags = !{!7, !8, !9, !10} +!llvm.module.flags = !{!7, !8, !9, !10, !1000} !llvm.ident = !{!11} !0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) @@ -115,3 +115,4 @@ !50 = !DISubprogram(name: "es", linkageName: "_Z2esPi", scope: !3, file: !3, line: 3, type: !51, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized, retainedNodes: !46) !51 = !DISubroutineType(types: !52) !52 = !{null, !5} +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/loop-hoist.ll b/llvm/test/DebugInfo/assignment-tracking/X86/loop-hoist.ll --- a/llvm/test/DebugInfo/assignment-tracking/X86/loop-hoist.ll +++ b/llvm/test/DebugInfo/assignment-tracking/X86/loop-hoist.ll @@ -1,4 +1,4 @@ -; RUN: llc %s -stop-after=finalize-isel -o - -experimental-assignment-tracking \ +; RUN: llc %s -stop-after=finalize-isel -o - \ ; RUN: | FileCheck %s --implicit-check-not=DBG_ ;; $ cat test.cpp @@ -64,7 +64,7 @@ declare void @llvm.dbg.value(metadata, metadata, metadata) #3 !llvm.dbg.cu = !{!2} -!llvm.module.flags = !{!7, !8, !9, !10} +!llvm.module.flags = !{!7, !8, !9, !10, !1000} !llvm.ident = !{!11} !0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) @@ -116,3 +116,4 @@ !50 = !DISubprogram(name: "es", linkageName: "_Z2esPi", scope: !3, file: !3, line: 3, type: !51, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized, retainedNodes: !46) !51 = !DISubroutineType(types: !52) !52 = !{null, !5} +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/loop-sink.ll b/llvm/test/DebugInfo/assignment-tracking/X86/loop-sink.ll --- a/llvm/test/DebugInfo/assignment-tracking/X86/loop-sink.ll +++ b/llvm/test/DebugInfo/assignment-tracking/X86/loop-sink.ll @@ -1,4 +1,4 @@ -; RUN: llc %s -stop-after=finalize-isel -o - -experimental-assignment-tracking \ +; RUN: llc %s -stop-after=finalize-isel -o - \ ; RUN: | FileCheck %s --implicit-check-not=DBG ;; Tiny loop with a store sunk out of it: @@ -70,7 +70,7 @@ declare dso_local i32 @getInt() !llvm.dbg.cu = !{!2} -!llvm.module.flags = !{!7, !8, !9, !10} +!llvm.module.flags = !{!7, !8, !9, !10, !1000} !llvm.ident = !{!11} !0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) @@ -112,3 +112,4 @@ !42 = !DISubprogram(name: "es", linkageName: "_Z2esPi", scope: !3, file: !3, line: 3, type: !43, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized, retainedNodes: !41) !43 = !DISubroutineType(types: !44) !44 = !{null, !5} +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/loop-unroll.ll b/llvm/test/DebugInfo/assignment-tracking/X86/loop-unroll.ll --- a/llvm/test/DebugInfo/assignment-tracking/X86/loop-unroll.ll +++ b/llvm/test/DebugInfo/assignment-tracking/X86/loop-unroll.ll @@ -1,5 +1,4 @@ ; RUN: llc %s -stop-after=finalize-isel -o - \ -; RUN: -experimental-assignment-tracking \ ; RUN: | FileCheck %s ;; ;; Backend counterpart to ../Generic/dbg-assign-loop-unroll. This IR was @@ -51,7 +50,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!3, !4, !5} +!llvm.module.flags = !{!3, !4, !5, !1000} !llvm.ident = !{!6} !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 12.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None) @@ -86,3 +85,4 @@ !33 = !DISubroutineType(types: !34) !34 = !{null, !35} !35 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !10, size: 64) +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/lower-offset-expression.ll b/llvm/test/DebugInfo/assignment-tracking/X86/lower-offset-expression.ll --- a/llvm/test/DebugInfo/assignment-tracking/X86/lower-offset-expression.ll +++ b/llvm/test/DebugInfo/assignment-tracking/X86/lower-offset-expression.ll @@ -1,5 +1,4 @@ ; RUN: llc %s -stop-after=finalize-isel -o - \ -; RUN: -experimental-assignment-tracking \ ; RUN: | FileCheck %s ;; Handwritten test. @@ -30,7 +29,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!3, !4, !5} +!llvm.module.flags = !{!3, !4, !5, !1000} !llvm.ident = !{!6} !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 12.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None) @@ -68,3 +67,4 @@ !55 = !{!10, !56} !56 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !10, size: 64) +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/lower-to-value.ll b/llvm/test/DebugInfo/assignment-tracking/X86/lower-to-value.ll --- a/llvm/test/DebugInfo/assignment-tracking/X86/lower-to-value.ll +++ b/llvm/test/DebugInfo/assignment-tracking/X86/lower-to-value.ll @@ -1,9 +1,7 @@ ; RUN: llc %s -stop-before finalize-isel -o - \ -; RUN: -experimental-assignment-tracking \ ; RUN: -experimental-debug-variable-locations=false \ ; RUN: | FileCheck %s --check-prefixes=CHECK,DBGVALUE --implicit-check-not=DBG_VALUE ; RUN: llc %s -stop-before finalize-isel -o - \ -; RUN: -experimental-assignment-tracking \ ; RUN: -experimental-debug-variable-locations=true \ ; RUN: | FileCheck %s --check-prefixes=CHECK,INSTRREF --implicit-check-not=DBG_VALUE \ ; RUN: --implicit-check-not=DBG_INSTR_REF @@ -77,7 +75,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!3, !4, !5} +!llvm.module.flags = !{!3, !4, !5, !1000} !llvm.ident = !{!6} !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 12.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None) @@ -112,3 +110,4 @@ !34 = !DISubroutineType(types: !35) !35 = !{null, !36} !36 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !10, size: 64) +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/mem-loc-frag-fill-cfg.ll b/llvm/test/DebugInfo/assignment-tracking/X86/mem-loc-frag-fill-cfg.ll --- a/llvm/test/DebugInfo/assignment-tracking/X86/mem-loc-frag-fill-cfg.ll +++ b/llvm/test/DebugInfo/assignment-tracking/X86/mem-loc-frag-fill-cfg.ll @@ -1,9 +1,7 @@ ; RUN: llc %s -stop-before finalize-isel -o - \ -; RUN: -experimental-assignment-tracking \ ; RUN: -experimental-debug-variable-locations=false \ ; RUN: | FileCheck %s --implicit-check-not=DBG_ ; RUN: llc %s -stop-before finalize-isel -o - \ -; RUN: -experimental-assignment-tracking \ ; RUN: -experimental-debug-variable-locations=true \ ; RUN: | FileCheck %s --implicit-check-not=DBG_ @@ -98,7 +96,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) #2 !llvm.dbg.cu = !{!2} -!llvm.module.flags = !{!11, !12, !13, !14} +!llvm.module.flags = !{!11, !12, !13, !14, !1000} !llvm.ident = !{!15} !0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) @@ -145,3 +143,4 @@ !67 = !{!68} !68 = !DIBasicType(name: "bool", size: 8, encoding: DW_ATE_boolean) !69 = !{} +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/mem-loc-frag-fill.ll b/llvm/test/DebugInfo/assignment-tracking/X86/mem-loc-frag-fill.ll --- a/llvm/test/DebugInfo/assignment-tracking/X86/mem-loc-frag-fill.ll +++ b/llvm/test/DebugInfo/assignment-tracking/X86/mem-loc-frag-fill.ll @@ -1,9 +1,7 @@ ; RUN: llc %s -stop-before finalize-isel -o - \ -; RUN: -experimental-assignment-tracking \ ; RUN: -experimental-debug-variable-locations=false \ ; RUN: | FileCheck %s --implicit-check-not=DBG_ ; RUN: llc %s -stop-before finalize-isel -o - \ -; RUN: -experimental-assignment-tracking \ ; RUN: -experimental-debug-variable-locations=true \ ; RUN: | FileCheck %s --implicit-check-not=DBG_ @@ -65,7 +63,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) #3 !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!2, !3, !4, !5} +!llvm.module.flags = !{!2, !3, !4, !5, !1000} !llvm.ident = !{!6} !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 14.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None) @@ -107,3 +105,4 @@ !41 = !DISubroutineType(types: !42) !42 = !{null, !43} !43 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !13, size: 64) +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/nested-loop-frags.ll b/llvm/test/DebugInfo/assignment-tracking/X86/nested-loop-frags.ll --- a/llvm/test/DebugInfo/assignment-tracking/X86/nested-loop-frags.ll +++ b/llvm/test/DebugInfo/assignment-tracking/X86/nested-loop-frags.ll @@ -1,4 +1,4 @@ -; RUN: llc %s -stop-after=finalize-isel -o - -experimental-assignment-tracking \ +; RUN: llc %s -stop-after=finalize-isel -o - \ ; RUN: | FileCheck %s --implicit-check-not=DBG ;; Test a variety of block inputs and lattice configurations for the assignment @@ -254,7 +254,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) !llvm.dbg.cu = !{!2} -!llvm.module.flags = !{!10, !11, !12, !13, !14, !15} +!llvm.module.flags = !{!10, !11, !12, !13, !14, !15, !1000} !llvm.ident = !{!16} !0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) @@ -329,3 +329,4 @@ !77 = distinct !DIAssignID() !78 = distinct !DIAssignID() !82 = distinct !DIAssignID() +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/nested-loop-sroa.ll b/llvm/test/DebugInfo/assignment-tracking/X86/nested-loop-sroa.ll --- a/llvm/test/DebugInfo/assignment-tracking/X86/nested-loop-sroa.ll +++ b/llvm/test/DebugInfo/assignment-tracking/X86/nested-loop-sroa.ll @@ -1,4 +1,4 @@ -; RUN: llc %s -stop-after=finalize-isel -o - -experimental-assignment-tracking \ +; RUN: llc %s -stop-after=finalize-isel -o - \ ; RUN: | FileCheck %s --implicit-check-not=DBG ;; Test a variety of block inputs and lattice configurations for the assignment @@ -321,7 +321,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) !llvm.dbg.cu = !{!2} -!llvm.module.flags = !{!10, !11, !12, !13, !14, !15} +!llvm.module.flags = !{!10, !11, !12, !13, !14, !15, !1000} !llvm.ident = !{!16} !0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) @@ -401,3 +401,4 @@ !82 = !DILocalVariable(name: "g", scope: !17, file: !3, line: 3, type: !7) !83 = distinct !DIAssignID() !84 = distinct !DIAssignID() +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/nested-loop.ll b/llvm/test/DebugInfo/assignment-tracking/X86/nested-loop.ll --- a/llvm/test/DebugInfo/assignment-tracking/X86/nested-loop.ll +++ b/llvm/test/DebugInfo/assignment-tracking/X86/nested-loop.ll @@ -1,4 +1,4 @@ -; RUN: llc %s -stop-after=finalize-isel -o - -experimental-assignment-tracking \ +; RUN: llc %s -stop-after=finalize-isel -o - \ ; RUN: | FileCheck %s --implicit-check-not=DBG ;; Test a variety of block inputs and lattice configurations for the assignment @@ -312,7 +312,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) !llvm.dbg.cu = !{!2} -!llvm.module.flags = !{!10, !11, !12, !13, !14, !15} +!llvm.module.flags = !{!10, !11, !12, !13, !14, !15, !1000} !llvm.ident = !{!16} !0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) @@ -396,3 +396,4 @@ !82 = !DILocalVariable(name: "g", scope: !17, file: !3, line: 3, type: !7) !83 = distinct !DIAssignID() !84 = distinct !DIAssignID() +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/no-redundant-def-after-alloca.ll b/llvm/test/DebugInfo/assignment-tracking/X86/no-redundant-def-after-alloca.ll --- a/llvm/test/DebugInfo/assignment-tracking/X86/no-redundant-def-after-alloca.ll +++ b/llvm/test/DebugInfo/assignment-tracking/X86/no-redundant-def-after-alloca.ll @@ -1,5 +1,4 @@ ; RUN: llc %s -o - -stop-after=finalize-isel \ -; RUN: -experimental-assignment-tracking \ ; RUN: | FileCheck %s --implicit-check-not=DBG_ ;; Hand written. Check that no unnecessary undef is inserted after an alloca @@ -25,7 +24,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!3, !4, !5} +!llvm.module.flags = !{!3, !4, !5, !1000} !llvm.ident = !{!6} !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 12.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None) @@ -46,3 +45,4 @@ !15 = distinct !DIAssignID() !16 = !DILocation(line: 4, column: 3, scope: !7) !17 = !DILocation(line: 5, column: 1, scope: !7) +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/order-of-defs.ll b/llvm/test/DebugInfo/assignment-tracking/X86/order-of-defs.ll --- a/llvm/test/DebugInfo/assignment-tracking/X86/order-of-defs.ll +++ b/llvm/test/DebugInfo/assignment-tracking/X86/order-of-defs.ll @@ -1,4 +1,4 @@ -; RUN: llc %s -stop-after=finalize-isel -o - -experimental-assignment-tracking \ +; RUN: llc %s -stop-after=finalize-isel -o - \ ; RUN: | FileCheck %s --implicit-check-not=DBG_ ;; Ensure that the order of several debug intrinsics between non-debug @@ -28,7 +28,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!2, !3, !4, !5} +!llvm.module.flags = !{!2, !3, !4, !5, !1000} !llvm.ident = !{!6} !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 14.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None) @@ -57,3 +57,4 @@ !23 = distinct !DIAssignID() !24 = !DILocation(line: 6, column: 14, scope: !7) !25 = !DILocation(line: 6, column: 3, scope: !7) +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/remove-redundant-defs-to-prevent-reordering.ll b/llvm/test/DebugInfo/assignment-tracking/X86/remove-redundant-defs-to-prevent-reordering.ll --- a/llvm/test/DebugInfo/assignment-tracking/X86/remove-redundant-defs-to-prevent-reordering.ll +++ b/llvm/test/DebugInfo/assignment-tracking/X86/remove-redundant-defs-to-prevent-reordering.ll @@ -1,9 +1,7 @@ ; RUN: llc %s -stop-before finalize-isel -o - \ -; RUN: -experimental-assignment-tracking \ ; RUN: -experimental-debug-variable-locations=false \ ; RUN: | FileCheck %s --check-prefixes=CHECK,DBGVALUE --implicit-check-not="DBG_VALUE \$noreg" ; RUN: llc %s -stop-before finalize-isel -o - \ -; RUN: -experimental-assignment-tracking \ ; RUN: -experimental-debug-variable-locations=true \ ; RUN: | FileCheck %s --check-prefixes=CHECK,INSTRREF --implicit-check-not="DBG_VALUE \$noreg" @@ -72,7 +70,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) #2 !llvm.dbg.cu = !{!2} -!llvm.module.flags = !{!7, !8, !9} +!llvm.module.flags = !{!7, !8, !9, !1000} !llvm.ident = !{!10} !0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) @@ -106,3 +104,4 @@ !32 = !DISubprogram(name: "ext", linkageName: "_Z3extv", scope: !3, file: !3, line: 2, type: !33, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized, retainedNodes: !4) !33 = !DISubroutineType(types: !34) !34 = !{null} +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/remove-undef-fragment.ll b/llvm/test/DebugInfo/assignment-tracking/X86/remove-undef-fragment.ll --- a/llvm/test/DebugInfo/assignment-tracking/X86/remove-undef-fragment.ll +++ b/llvm/test/DebugInfo/assignment-tracking/X86/remove-undef-fragment.ll @@ -1,5 +1,4 @@ ; RUN: llc %s -o - -stop-after=finalize-isel \ -; RUN: -experimental-assignment-tracking \ ; RUN: | FileCheck %s --implicit-check-not=DBG ;; In the IR below, for variable n, we get dbg intrinsics that describe this: @@ -86,7 +85,7 @@ declare void @llvm.dbg.value(metadata, metadata, metadata) !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!2, !3, !4, !5, !6} +!llvm.module.flags = !{!2, !3, !4, !5, !6, !1000} !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 14.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None) !1 = !DIFile(filename: "reduce.cpp", directory: "/") @@ -105,3 +104,4 @@ !14 = distinct !DIAssignID() !15 = !DILocation(line: 0, scope: !7) !16 = distinct !DIAssignID() +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/sdag-dangling-dbgassign.ll b/llvm/test/DebugInfo/assignment-tracking/X86/sdag-dangling-dbgassign.ll --- a/llvm/test/DebugInfo/assignment-tracking/X86/sdag-dangling-dbgassign.ll +++ b/llvm/test/DebugInfo/assignment-tracking/X86/sdag-dangling-dbgassign.ll @@ -1,9 +1,7 @@ ; RUN: llc %s -stop-before finalize-isel -o - \ -; RUN: -experimental-assignment-tracking \ ; RUN: -experimental-debug-variable-locations=false \ ; RUN: | FileCheck %s --check-prefixes=CHECK,DBGVALUE ; RUN: llc %s -stop-before finalize-isel -o - \ -; RUN: -experimental-assignment-tracking \ ; RUN: -experimental-debug-variable-locations=true \ ; RUN: | FileCheck %s --check-prefixes=CHECK,INSTRREF @@ -158,7 +156,7 @@ attributes #1 = { nounwind readnone speculatable } !llvm.dbg.cu = !{!2} -!llvm.module.flags = !{!12, !13, !14, !15} +!llvm.module.flags = !{!12, !13, !14, !15, !1000} !llvm.ident = !{!16} !0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) @@ -216,3 +214,4 @@ !52 = !DILocation(line: 33, column: 14, scope: !47) !53 = !DILocation(line: 35, column: 3, scope: !47) !54 = distinct !DIAssignID() +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/sdag-ir-salvage-assign.ll b/llvm/test/DebugInfo/assignment-tracking/X86/sdag-ir-salvage-assign.ll --- a/llvm/test/DebugInfo/assignment-tracking/X86/sdag-ir-salvage-assign.ll +++ b/llvm/test/DebugInfo/assignment-tracking/X86/sdag-ir-salvage-assign.ll @@ -1,10 +1,8 @@ ; RUN: llc -mtriple=x86_64-unknown-unknown -start-after=codegenprepare \ -; RUN: -experimental-assignment-tracking \ ; RUN: -stop-before finalize-isel %s -o - \ ; RUN: -experimental-debug-variable-locations=false \ ; RUN: | FileCheck %s --check-prefixes=CHECK,DBGVALUE ; RUN: llc -mtriple=x86_64-unknown-unknown -start-after=codegenprepare \ -; RUN: -experimental-assignment-tracking \ ; RUN: -stop-before finalize-isel %s -o - \ ; RUN: -experimental-debug-variable-locations=true \ ; RUN: | FileCheck %s --check-prefixes=CHECK,INSTRREF @@ -51,7 +49,7 @@ attributes #0 = { nounwind readnone speculatable } !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!25, !26, !27, !28} +!llvm.module.flags = !{!25, !26, !27, !28, !1000} !llvm.ident = !{!29} !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) @@ -70,3 +68,4 @@ !29 = !{!"clang"} !30 = !DILocation(line: 18, column: 14, scope: !6) !31 = distinct !DIAssignID() +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/sdag-transfer-dbgassign.ll b/llvm/test/DebugInfo/assignment-tracking/X86/sdag-transfer-dbgassign.ll --- a/llvm/test/DebugInfo/assignment-tracking/X86/sdag-transfer-dbgassign.ll +++ b/llvm/test/DebugInfo/assignment-tracking/X86/sdag-transfer-dbgassign.ll @@ -1,9 +1,7 @@ ; RUN: llc %s -start-after=codegenprepare -stop-before finalize-isel -o - \ -; RUN: -experimental-assignment-tracking \ ; RUN: -experimental-debug-variable-locations=false \ ; RUN: | FileCheck %s --check-prefixes=CHECK,DBGVALUE ; RUN: llc %s -start-after=codegenprepare -stop-before finalize-isel -o - \ -; RUN: -experimental-assignment-tracking \ ; RUN: -experimental-debug-variable-locations=true \ ; RUN: | FileCheck %s --check-prefixes=CHECK,INSTRREF @@ -52,7 +50,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!3, !4, !5} +!llvm.module.flags = !{!3, !4, !5, !1000} !llvm.ident = !{!6} !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 10.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, nameTableKind: None) @@ -75,3 +73,4 @@ !17 = !DILocation(line: 0, scope: !7) !18 = !DILocation(line: 2, column: 13, scope: !7) !19 = distinct !DIAssignID() +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/single-memory-location-2.ll b/llvm/test/DebugInfo/assignment-tracking/X86/single-memory-location-2.ll --- a/llvm/test/DebugInfo/assignment-tracking/X86/single-memory-location-2.ll +++ b/llvm/test/DebugInfo/assignment-tracking/X86/single-memory-location-2.ll @@ -1,5 +1,4 @@ ; RUN: llc -stop-after=finalize-isel %s -o - \ -; RUN: -experimental-assignment-tracking \ ; RUN: | FileCheck %s ;; Check that a dbg.assign for a fully stack-homed variable causes the variable @@ -67,7 +66,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!3, !4, !5} +!llvm.module.flags = !{!3, !4, !5, !1000} !llvm.ident = !{!6} !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 12.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None) @@ -109,3 +108,4 @@ !40 = !DISubprogram(name: "doSomething", linkageName: "_Z11doSomethingi", scope: !1, file: !1, line: 3, type: !41, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized, retainedNodes: !2) !41 = !DISubroutineType(types: !42) !42 = !{null, !12} +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/single-memory-location.ll b/llvm/test/DebugInfo/assignment-tracking/X86/single-memory-location.ll --- a/llvm/test/DebugInfo/assignment-tracking/X86/single-memory-location.ll +++ b/llvm/test/DebugInfo/assignment-tracking/X86/single-memory-location.ll @@ -1,5 +1,4 @@ ; RUN: llc -stop-after=finalize-isel %s -o - \ -; RUN: -experimental-assignment-tracking \ ; RUN: | FileCheck %s ;; Check that a dbg.assign for a fully stack-homed variable causes the variable @@ -47,7 +46,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!3, !4, !5} +!llvm.module.flags = !{!3, !4, !5, !1000} !llvm.ident = !{!6} !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 12.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None) @@ -78,3 +77,4 @@ !29 = !DISubprogram(name: "ext", linkageName: "_Z3extiiiiiiiiii", scope: !1, file: !1, line: 2, type: !30, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized, retainedNodes: !2) !30 = !DISubroutineType(types: !31) !31 = !{null, !10, !10, !10, !10, !10, !10, !10, !10, !10, !10} +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/split-alloca.ll b/llvm/test/DebugInfo/assignment-tracking/X86/split-alloca.ll --- a/llvm/test/DebugInfo/assignment-tracking/X86/split-alloca.ll +++ b/llvm/test/DebugInfo/assignment-tracking/X86/split-alloca.ll @@ -1,5 +1,4 @@ ; RUN: llc %s -o - -stop-after=finalize-isel \ -; RUN: -experimental-assignment-tracking \ ; RUN: | FileCheck %s --implicit-check-not=DBG ;; Hand written. Check that we fall back to emitting a list of defs for @@ -31,7 +30,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!2, !3, !4, !5} +!llvm.module.flags = !{!2, !3, !4, !5, !1000} !llvm.ident = !{!6} !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 14.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None) @@ -56,3 +55,4 @@ !19 = !DILocation(line: 3, column: 1, scope: !7) !20 = distinct !DIAssignID() !21 = distinct !DIAssignID() +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/untagged-store-frag.ll b/llvm/test/DebugInfo/assignment-tracking/X86/untagged-store-frag.ll --- a/llvm/test/DebugInfo/assignment-tracking/X86/untagged-store-frag.ll +++ b/llvm/test/DebugInfo/assignment-tracking/X86/untagged-store-frag.ll @@ -1,4 +1,4 @@ -; RUN: llc %s -stop-after=finalize-isel -o - -experimental-assignment-tracking \ +; RUN: llc %s -stop-after=finalize-isel -o - \ ; RUN: | FileCheck %s --implicit-check-not=DBG_ ;; Hand-written to test untagged store handling on a simple case. Here's what @@ -59,7 +59,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) #1 !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!2, !3, !4, !5, !6} +!llvm.module.flags = !{!2, !3, !4, !5, !6, !1000} !llvm.ident = !{!7} !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 14.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None) @@ -80,3 +80,4 @@ !15 = !DILocation(line: 0, scope: !8) !16 = distinct !DIAssignID() !17 = !DILocalVariable(name: "b", arg: 2, scope: !8, file: !1, line: 1, type: !11) +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/use-known-value-at-early-mem-def-2.ll b/llvm/test/DebugInfo/assignment-tracking/X86/use-known-value-at-early-mem-def-2.ll --- a/llvm/test/DebugInfo/assignment-tracking/X86/use-known-value-at-early-mem-def-2.ll +++ b/llvm/test/DebugInfo/assignment-tracking/X86/use-known-value-at-early-mem-def-2.ll @@ -1,5 +1,4 @@ ; RUN: llc %s -stop-after=finalize-isel -o - \ -; RUN: -experimental-assignment-tracking \ ; RUN: | FileCheck %s --implicit-check-not=DBG_VALUE ;; Check that sandwiching instructions between a linked store and dbg.assign @@ -58,7 +57,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) #3 !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!3, !4, !5} +!llvm.module.flags = !{!3, !4, !5, !1000} !llvm.ident = !{!6} !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 12.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None) @@ -90,3 +89,4 @@ !29 = !{null, !30} !30 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !12, size: 64) !31 = distinct !DIAssignID() +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/use-known-value-at-early-mem-def.ll b/llvm/test/DebugInfo/assignment-tracking/X86/use-known-value-at-early-mem-def.ll --- a/llvm/test/DebugInfo/assignment-tracking/X86/use-known-value-at-early-mem-def.ll +++ b/llvm/test/DebugInfo/assignment-tracking/X86/use-known-value-at-early-mem-def.ll @@ -1,5 +1,4 @@ ; RUN: llc %s -stop-after=finalize-isel -o - \ -; RUN: -experimental-assignment-tracking \ ; RUN: | FileCheck %s --implicit-check-not=DBG_VALUE ;; Check that sandwiching instructions between a linked store and dbg.assign @@ -49,7 +48,7 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) #3 !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!3, !4, !5} +!llvm.module.flags = !{!3, !4, !5, !1000} !llvm.ident = !{!6} !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 12.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None) @@ -81,3 +80,4 @@ !29 = !{null, !30} !30 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !12, size: 64) !31 = distinct !DIAssignID() +!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true}