[llvm] 30845e8 - [RemoveDIs][DebugInfo] Handle DPVAssigns in Assignment Tracking excluding lowering (#78982)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 23 06:27:05 PST 2024
Author: Stephen Tozer
Date: 2024-01-23T14:27:01Z
New Revision: 30845e8ab46c416a2e333eb84239e9ec71e92617
URL: https://github.com/llvm/llvm-project/commit/30845e8ab46c416a2e333eb84239e9ec71e92617
DIFF: https://github.com/llvm/llvm-project/commit/30845e8ab46c416a2e333eb84239e9ec71e92617.diff
LOG: [RemoveDIs][DebugInfo] Handle DPVAssigns in Assignment Tracking excluding lowering (#78982)
This patch adds support for DPVAssigns across all of
AssignmentTrackingAnalysis except for AssignmentTrackingLowering, which
is implemented in a separate patch. This patch includes handling
DPValues in MemLocFragFill, the removal of redundant DPValues as part of
AssignmentTrackingAnalysis (which is different to the version in
`BasicBlockUtils.cpp`), and preventing the DPVAssigns from being
directly emitted in SelectionDAG (just as we don't emit llvm.dbg.assigns
directly, but receive a set of locations from
AssignmentTrackingAnalysis' output).
Added:
Modified:
llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
llvm/test/DebugInfo/assignment-tracking/AArch64/scalable-vectors.ll
llvm/test/DebugInfo/assignment-tracking/X86/DSE.ll
llvm/test/DebugInfo/assignment-tracking/X86/assignment-tracking-not-enabled.ll
llvm/test/DebugInfo/assignment-tracking/X86/coalesce-cfg.ll
llvm/test/DebugInfo/assignment-tracking/X86/dbg-phi-produces-undef.ll
llvm/test/DebugInfo/assignment-tracking/X86/diamond-1.ll
llvm/test/DebugInfo/assignment-tracking/X86/diamond-2.ll
llvm/test/DebugInfo/assignment-tracking/X86/diamond-3.ll
llvm/test/DebugInfo/assignment-tracking/X86/frag-size-zero.ll
llvm/test/DebugInfo/assignment-tracking/X86/global-storage.ll
llvm/test/DebugInfo/assignment-tracking/X86/large-type.ll
llvm/test/DebugInfo/assignment-tracking/X86/loop-hoist.ll
llvm/test/DebugInfo/assignment-tracking/X86/loop-sink.ll
llvm/test/DebugInfo/assignment-tracking/X86/loop-unroll.ll
llvm/test/DebugInfo/assignment-tracking/X86/lower-offset-expression.ll
llvm/test/DebugInfo/assignment-tracking/X86/lower-to-value.ll
llvm/test/DebugInfo/assignment-tracking/X86/mem-loc-frag-fill-cfg.ll
llvm/test/DebugInfo/assignment-tracking/X86/mem-loc-frag-fill.ll
llvm/test/DebugInfo/assignment-tracking/X86/negative-offset.ll
llvm/test/DebugInfo/assignment-tracking/X86/nested-loop-frags.ll
llvm/test/DebugInfo/assignment-tracking/X86/nested-loop-sroa.ll
llvm/test/DebugInfo/assignment-tracking/X86/nested-loop.ll
llvm/test/DebugInfo/assignment-tracking/X86/no-redundant-def-after-alloca.ll
llvm/test/DebugInfo/assignment-tracking/X86/order-of-defs.ll
llvm/test/DebugInfo/assignment-tracking/X86/remove-redundant-defs-bwd-scan.ll
llvm/test/DebugInfo/assignment-tracking/X86/remove-redundant-defs-to-prevent-reordering.ll
llvm/test/DebugInfo/assignment-tracking/X86/sdag-dangling-dbgassign.ll
llvm/test/DebugInfo/assignment-tracking/X86/sdag-ir-salvage-assign.ll
llvm/test/DebugInfo/assignment-tracking/X86/sdag-transfer-dbgassign.ll
llvm/test/DebugInfo/assignment-tracking/X86/single-memory-location-2.ll
llvm/test/DebugInfo/assignment-tracking/X86/single-memory-location.ll
llvm/test/DebugInfo/assignment-tracking/X86/split-alloca.ll
llvm/test/DebugInfo/assignment-tracking/X86/untagged-store-assignment-extra-checks.ll
llvm/test/DebugInfo/assignment-tracking/X86/untagged-store-assignment-outside-variable.ll
llvm/test/DebugInfo/assignment-tracking/X86/use-known-value-at-early-mem-def-2.ll
llvm/test/DebugInfo/assignment-tracking/X86/use-known-value-at-early-mem-def.ll
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp b/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
index a558a304e8f41bc..f8ce8f98864ea37 100644
--- a/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
+++ b/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
@@ -829,6 +829,13 @@ class MemLocFragmentFill {
void process(BasicBlock &BB, VarFragMap &LiveSet) {
BBInsertBeforeMap[&BB].clear();
for (auto &I : BB) {
+ for (auto &DPV : I.getDbgValueRange()) {
+ if (const auto *Locs = FnVarLocs->getWedge(&DPV)) {
+ for (const VarLocInfo &Loc : *Locs) {
+ addDef(Loc, &DPV, *I.getParent(), LiveSet);
+ }
+ }
+ }
if (const auto *Locs = FnVarLocs->getWedge(&I)) {
for (const VarLocInfo &Loc : *Locs) {
addDef(Loc, &I, *I.getParent(), LiveSet);
@@ -2487,73 +2494,78 @@ removeRedundantDbgLocsUsingBackwardScan(const BasicBlock *BB,
VariableDefinedBytes.clear();
}
- // Get the location defs that start just before this instruction.
- const auto *Locs = FnVarLocs.getWedge(&I);
- if (!Locs)
- continue;
+ auto HandleLocsForWedge = [&](auto *WedgePosition) {
+ // Get the location defs that start just before this instruction.
+ const auto *Locs = FnVarLocs.getWedge(WedgePosition);
+ if (!Locs)
+ return;
+
+ NumWedgesScanned++;
+ bool ChangedThisWedge = false;
+ // The new pruned set of defs, reversed because we're scanning backwards.
+ SmallVector<VarLocInfo> NewDefsReversed;
+
+ // Iterate over the existing defs in reverse.
+ for (auto RIt = Locs->rbegin(), REnd = Locs->rend(); RIt != REnd; ++RIt) {
+ NumDefsScanned++;
+ DebugAggregate Aggr =
+ getAggregate(FnVarLocs.getVariable(RIt->VariableID));
+ uint64_t SizeInBits = Aggr.first->getSizeInBits().value_or(0);
+ uint64_t SizeInBytes = divideCeil(SizeInBits, 8);
+
+ // Cutoff for large variables to prevent expensive bitvector operations.
+ const uint64_t MaxSizeBytes = 2048;
+
+ if (SizeInBytes == 0 || SizeInBytes > MaxSizeBytes) {
+ // If the size is unknown (0) then keep this location def to be safe.
+ // Do the same for defs of large variables, which would be expensive
+ // to represent with a BitVector.
+ NewDefsReversed.push_back(*RIt);
+ continue;
+ }
- NumWedgesScanned++;
- bool ChangedThisWedge = false;
- // The new pruned set of defs, reversed because we're scanning backwards.
- SmallVector<VarLocInfo> NewDefsReversed;
-
- // Iterate over the existing defs in reverse.
- for (auto RIt = Locs->rbegin(), REnd = Locs->rend(); RIt != REnd; ++RIt) {
- NumDefsScanned++;
- DebugAggregate Aggr =
- getAggregate(FnVarLocs.getVariable(RIt->VariableID));
- uint64_t SizeInBits = Aggr.first->getSizeInBits().value_or(0);
- uint64_t SizeInBytes = divideCeil(SizeInBits, 8);
-
- // Cutoff for large variables to prevent expensive bitvector operations.
- const uint64_t MaxSizeBytes = 2048;
-
- if (SizeInBytes == 0 || SizeInBytes > MaxSizeBytes) {
- // If the size is unknown (0) then keep this location def to be safe.
- // Do the same for defs of large variables, which would be expensive
- // to represent with a BitVector.
- NewDefsReversed.push_back(*RIt);
- continue;
- }
+ // Only keep this location definition if it is not fully eclipsed by
+ // other definitions in this wedge that come after it
+
+ // Inert the bytes the location definition defines.
+ auto InsertResult =
+ VariableDefinedBytes.try_emplace(Aggr, BitVector(SizeInBytes));
+ bool FirstDefinition = InsertResult.second;
+ BitVector &DefinedBytes = InsertResult.first->second;
+
+ DIExpression::FragmentInfo Fragment =
+ RIt->Expr->getFragmentInfo().value_or(
+ DIExpression::FragmentInfo(SizeInBits, 0));
+ bool InvalidFragment = Fragment.endInBits() > SizeInBits;
+ uint64_t StartInBytes = Fragment.startInBits() / 8;
+ uint64_t EndInBytes = divideCeil(Fragment.endInBits(), 8);
+
+ // If this defines any previously undefined bytes, keep it.
+ if (FirstDefinition || InvalidFragment ||
+ DefinedBytes.find_first_unset_in(StartInBytes, EndInBytes) != -1) {
+ if (!InvalidFragment)
+ DefinedBytes.set(StartInBytes, EndInBytes);
+ NewDefsReversed.push_back(*RIt);
+ continue;
+ }
- // Only keep this location definition if it is not fully eclipsed by
- // other definitions in this wedge that come after it
-
- // Inert the bytes the location definition defines.
- auto InsertResult =
- VariableDefinedBytes.try_emplace(Aggr, BitVector(SizeInBytes));
- bool FirstDefinition = InsertResult.second;
- BitVector &DefinedBytes = InsertResult.first->second;
-
- DIExpression::FragmentInfo Fragment =
- RIt->Expr->getFragmentInfo().value_or(
- DIExpression::FragmentInfo(SizeInBits, 0));
- bool InvalidFragment = Fragment.endInBits() > SizeInBits;
- uint64_t StartInBytes = Fragment.startInBits() / 8;
- uint64_t EndInBytes = divideCeil(Fragment.endInBits(), 8);
-
- // If this defines any previously undefined bytes, keep it.
- if (FirstDefinition || InvalidFragment ||
- DefinedBytes.find_first_unset_in(StartInBytes, EndInBytes) != -1) {
- if (!InvalidFragment)
- DefinedBytes.set(StartInBytes, EndInBytes);
- NewDefsReversed.push_back(*RIt);
- continue;
+ // Redundant def found: throw it away. Since the wedge of defs is being
+ // rebuilt, doing nothing is the same as deleting an entry.
+ ChangedThisWedge = true;
+ NumDefsRemoved++;
}
- // Redundant def found: throw it away. Since the wedge of defs is being
- // rebuilt, doing nothing is the same as deleting an entry.
- ChangedThisWedge = true;
- NumDefsRemoved++;
- }
-
- // Un-reverse the defs and replace the wedge with the pruned version.
- if (ChangedThisWedge) {
- std::reverse(NewDefsReversed.begin(), NewDefsReversed.end());
- FnVarLocs.setWedge(&I, std::move(NewDefsReversed));
- NumWedgesChanged++;
- Changed = true;
- }
+ // Un-reverse the defs and replace the wedge with the pruned version.
+ if (ChangedThisWedge) {
+ std::reverse(NewDefsReversed.begin(), NewDefsReversed.end());
+ FnVarLocs.setWedge(WedgePosition, std::move(NewDefsReversed));
+ NumWedgesChanged++;
+ Changed = true;
+ }
+ };
+ HandleLocsForWedge(&I);
+ for (DPValue &DPV : reverse(I.getDbgValueRange()))
+ HandleLocsForWedge(&DPV);
}
return Changed;
@@ -2578,42 +2590,48 @@ removeRedundantDbgLocsUsingForwardScan(const BasicBlock *BB,
// instructions.
for (const Instruction &I : *BB) {
// Get the defs that come just before this instruction.
- const auto *Locs = FnVarLocs.getWedge(&I);
- if (!Locs)
- continue;
-
- NumWedgesScanned++;
- bool ChangedThisWedge = false;
- // The new pruned set of defs.
- SmallVector<VarLocInfo> NewDefs;
+ auto HandleLocsForWedge = [&](auto *WedgePosition) {
+ const auto *Locs = FnVarLocs.getWedge(WedgePosition);
+ if (!Locs)
+ return;
+
+ NumWedgesScanned++;
+ bool ChangedThisWedge = false;
+ // The new pruned set of defs.
+ SmallVector<VarLocInfo> NewDefs;
+
+ // Iterate over the existing defs.
+ for (const VarLocInfo &Loc : *Locs) {
+ NumDefsScanned++;
+ DebugVariable Key(FnVarLocs.getVariable(Loc.VariableID).getVariable(),
+ std::nullopt, Loc.DL.getInlinedAt());
+ auto VMI = VariableMap.find(Key);
+
+ // Update the map if we found a new value/expression describing the
+ // variable, or if the variable wasn't mapped already.
+ if (VMI == VariableMap.end() || VMI->second.first != Loc.Values ||
+ VMI->second.second != Loc.Expr) {
+ VariableMap[Key] = {Loc.Values, Loc.Expr};
+ NewDefs.push_back(Loc);
+ continue;
+ }
- // Iterate over the existing defs.
- for (const VarLocInfo &Loc : *Locs) {
- NumDefsScanned++;
- DebugVariable Key(FnVarLocs.getVariable(Loc.VariableID).getVariable(),
- std::nullopt, Loc.DL.getInlinedAt());
- auto VMI = VariableMap.find(Key);
-
- // Update the map if we found a new value/expression describing the
- // variable, or if the variable wasn't mapped already.
- if (VMI == VariableMap.end() || VMI->second.first != Loc.Values ||
- VMI->second.second != Loc.Expr) {
- VariableMap[Key] = {Loc.Values, Loc.Expr};
- NewDefs.push_back(Loc);
- continue;
+ // Did not insert this Loc, which is the same as removing it.
+ ChangedThisWedge = true;
+ NumDefsRemoved++;
}
- // Did not insert this Loc, which is the same as removing it.
- ChangedThisWedge = true;
- NumDefsRemoved++;
- }
+ // Replace the existing wedge with the pruned version.
+ if (ChangedThisWedge) {
+ FnVarLocs.setWedge(WedgePosition, std::move(NewDefs));
+ NumWedgesChanged++;
+ Changed = true;
+ }
+ };
- // Replace the existing wedge with the pruned version.
- if (ChangedThisWedge) {
- FnVarLocs.setWedge(&I, std::move(NewDefs));
- NumWedgesChanged++;
- Changed = true;
- }
+ for (DPValue &DPV : I.getDbgValueRange())
+ HandleLocsForWedge(&DPV);
+ HandleLocsForWedge(&I);
}
return Changed;
@@ -2660,41 +2678,46 @@ removeUndefDbgLocsFromEntryBlock(const BasicBlock *BB,
// instructions.
for (const Instruction &I : *BB) {
// Get the defs that come just before this instruction.
- const auto *Locs = FnVarLocs.getWedge(&I);
- if (!Locs)
- continue;
-
- NumWedgesScanned++;
- bool ChangedThisWedge = false;
- // The new pruned set of defs.
- SmallVector<VarLocInfo> NewDefs;
-
- // Iterate over the existing defs.
- for (const VarLocInfo &Loc : *Locs) {
- NumDefsScanned++;
- DebugAggregate Aggr{FnVarLocs.getVariable(Loc.VariableID).getVariable(),
- Loc.DL.getInlinedAt()};
- DebugVariable Var = FnVarLocs.getVariable(Loc.VariableID);
+ auto HandleLocsForWedge = [&](auto *WedgePosition) {
+ const auto *Locs = FnVarLocs.getWedge(WedgePosition);
+ if (!Locs)
+ return;
+
+ NumWedgesScanned++;
+ bool ChangedThisWedge = false;
+ // The new pruned set of defs.
+ SmallVector<VarLocInfo> NewDefs;
+
+ // Iterate over the existing defs.
+ for (const VarLocInfo &Loc : *Locs) {
+ NumDefsScanned++;
+ DebugAggregate Aggr{FnVarLocs.getVariable(Loc.VariableID).getVariable(),
+ Loc.DL.getInlinedAt()};
+ DebugVariable Var = FnVarLocs.getVariable(Loc.VariableID);
+
+ // Remove undef entries that are encountered before any non-undef
+ // intrinsics from the entry block.
+ if (Loc.Values.isKillLocation(Loc.Expr) && !HasDefinedBits(Aggr, Var)) {
+ // Did not insert this Loc, which is the same as removing it.
+ NumDefsRemoved++;
+ ChangedThisWedge = true;
+ continue;
+ }
- // Remove undef entries that are encountered before any non-undef
- // intrinsics from the entry block.
- if (Loc.Values.isKillLocation(Loc.Expr) && !HasDefinedBits(Aggr, Var)) {
- // Did not insert this Loc, which is the same as removing it.
- NumDefsRemoved++;
- ChangedThisWedge = true;
- continue;
+ DefineBits(Aggr, Var);
+ NewDefs.push_back(Loc);
}
- DefineBits(Aggr, Var);
- NewDefs.push_back(Loc);
- }
-
- // Replace the existing wedge with the pruned version.
- if (ChangedThisWedge) {
- FnVarLocs.setWedge(&I, std::move(NewDefs));
- NumWedgesChanged++;
- Changed = true;
- }
+ // Replace the existing wedge with the pruned version.
+ if (ChangedThisWedge) {
+ FnVarLocs.setWedge(WedgePosition, std::move(NewDefs));
+ NumWedgesChanged++;
+ Changed = true;
+ }
+ };
+ for (DPValue &DPV : I.getDbgValueRange())
+ HandleLocsForWedge(&DPV);
+ HandleLocsForWedge(&I);
}
return Changed;
@@ -2726,6 +2749,9 @@ static DenseSet<DebugAggregate> findVarsWithStackSlot(Function &Fn) {
for (DbgAssignIntrinsic *DAI : at::getAssignmentMarkers(&I)) {
Result.insert({DAI->getVariable(), DAI->getDebugLoc().getInlinedAt()});
}
+ for (DPValue *DPV : at::getDPVAssignmentMarkers(&I)) {
+ Result.insert({DPV->getVariable(), DPV->getDebugLoc().getInlinedAt()});
+ }
}
}
return Result;
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index a7dd23f78993fe1..5ce1013f30fd1b8 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -1241,6 +1241,11 @@ void SelectionDAGBuilder::visitDbgInfo(const Instruction &I) {
It->Expr, Vals.size() > 1, It->DL, SDNodeOrder);
}
}
+ // We must early-exit here to prevent any DPValues from being emitted below,
+ // as we have just emitted the debug values resulting from assignment
+ // tracking analysis, making any existing DPValues redundant (and probably
+ // less correct).
+ return;
}
// Is there is any debug-info attached to this instruction, in the form of
diff --git a/llvm/test/DebugInfo/assignment-tracking/AArch64/scalable-vectors.ll b/llvm/test/DebugInfo/assignment-tracking/AArch64/scalable-vectors.ll
index 4f3db535f6eb872..81a154222165093 100644
--- a/llvm/test/DebugInfo/assignment-tracking/AArch64/scalable-vectors.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/AArch64/scalable-vectors.ll
@@ -1,5 +1,8 @@
; RUN: llc %s -stop-after=finalize-isel -o - | FileCheck %s
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - | FileCheck %s
+
;; Hand written. Check AssignmentTrackingAnalysis doesn't try to get the size
;; of scalable vectors (which causes an assertion failure).
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/DSE.ll b/llvm/test/DebugInfo/assignment-tracking/X86/DSE.ll
index 057c82b0872a6f4..57bb53d8269c3f4 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/DSE.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/DSE.ll
@@ -1,6 +1,10 @@
; RUN: llc %s -stop-before=finalize-isel -o - \
; RUN: | FileCheck %s
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-before=finalize-isel -o - \
+; RUN: | FileCheck %s
+
; Check basic lowering behaviour of dbg.assign intrinsics. The first
; assignment to `local`, which has been DSE'd, should be represented with a
; constant value DBG_VALUE. The second assignment should have a DBG_VALUE
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/assignment-tracking-not-enabled.ll b/llvm/test/DebugInfo/assignment-tracking/X86/assignment-tracking-not-enabled.ll
index 73b4fd0b75dab56..2f0b4fd284b9a44 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/assignment-tracking-not-enabled.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/assignment-tracking-not-enabled.ll
@@ -1,6 +1,10 @@
; RUN: llc %s -stop-after=finalize-isel -o - \
; RUN: | FileCheck %s --implicit-check-not=DBG_
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - \
+; RUN: | FileCheck %s --implicit-check-not=DBG_
+
;; Check that SelectionDAG downgrades dbg.assigns to dbg.values if assignment
;; tracking isn't enabled (e.g. if the module flag
;; "debug-info-assignment-tracking" is missing / false).
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/coalesce-cfg.ll b/llvm/test/DebugInfo/assignment-tracking/X86/coalesce-cfg.ll
index 49fbcb95818ae7e..5c0d24e1155c5ad 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/coalesce-cfg.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/coalesce-cfg.ll
@@ -1,6 +1,10 @@
; RUN: llc %s -o - -stop-after=finalize-isel \
; RUN: | FileCheck %s --implicit-check-not=DBG_
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -o - -stop-after=finalize-isel \
+; RUN: | FileCheck %s --implicit-check-not=DBG_
+
;; Test coalescing of contiguous fragments in adjacent location definitions.
;; Further details and check directives inline.
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
index 37a2dbd4521613c..2ab4e57f470af7d 100644
--- 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,6 +1,10 @@
; RUN: llc %s -stop-after=finalize-isel -o - \
; RUN: | FileCheck %s
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - \
+; RUN: | FileCheck %s
+
;; Hand written test because the scenario is unlikely. Check that the "value"
;; of a debug def PHIs is "undef" (because we don't actually track PHIs).
;;
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/diamond-1.ll b/llvm/test/DebugInfo/assignment-tracking/X86/diamond-1.ll
index b4e84a997830115..07d0540107f47ba 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/diamond-1.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/diamond-1.ll
@@ -1,6 +1,10 @@
; RUN: llc %s -stop-after=finalize-isel -o - \
; RUN: | FileCheck %s
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - \
+; RUN: | FileCheck %s
+
;; cat test.cpp
;; void d();
;; void e();
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/diamond-2.ll b/llvm/test/DebugInfo/assignment-tracking/X86/diamond-2.ll
index 1526b3471b2e0af..2dd82ff9e595a18 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/diamond-2.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/diamond-2.ll
@@ -1,6 +1,10 @@
; RUN: llc %s -stop-after=finalize-isel -o - \
; RUN: | FileCheck %s
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - \
+; RUN: | FileCheck %s
+
;; Same as diamond-1.ll except that the DIAssignID attached to the store has
;; been deleted. In this case, we expect the same output as for diamond-1.ll
;; because we choose to interpret stores to stack slots that don't link to
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/diamond-3.ll b/llvm/test/DebugInfo/assignment-tracking/X86/diamond-3.ll
index b20b166cb9cd499..69ae720276a70c3 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/diamond-3.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/diamond-3.ll
@@ -1,6 +1,10 @@
; RUN: llc %s -stop-after=finalize-isel -o - \
; RUN: | FileCheck %s --implicit-check-not=DBG_
+
+; RUN: llc --try-experimental-debuginfo-iterators %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
;; file name includes "diamond" because the idea is that we lose (while
;; optimizing) one of the diamond branches which was empty except for a debug
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/frag-size-zero.ll b/llvm/test/DebugInfo/assignment-tracking/X86/frag-size-zero.ll
index 3a3865d0511b944..c6124df1b26e95d 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/frag-size-zero.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/frag-size-zero.ll
@@ -1,5 +1,8 @@
; RUN: llc %s -stop-after=finalize-isel -o - | FileCheck %s
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - | FileCheck %s
+
;; Check that a zero-sized fragment (the final dbg.assign) is ignored by
;; AssignmentTrackingAnalysis.
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/global-storage.ll b/llvm/test/DebugInfo/assignment-tracking/X86/global-storage.ll
index 7d265acdb5bb40c..d7b8d76fdecaa8d 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/global-storage.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/global-storage.ll
@@ -1,5 +1,8 @@
; RUN: llc %s -stop-after=finalize-isel -o - | FileCheck %s
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - | FileCheck %s
+
;; Local variable has global storage. Check AssignmentTrackingAnalysis doesn't
;; crash/assert.
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/large-type.ll b/llvm/test/DebugInfo/assignment-tracking/X86/large-type.ll
index cebbc162fcb3a8a..9ab0f365978875c 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/large-type.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/large-type.ll
@@ -1,6 +1,10 @@
; RUN: llc %s -stop-after=finalize-isel -o - \
; RUN: | FileCheck %s --implicit-check-not=DBG_
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - \
+; RUN: | FileCheck %s --implicit-check-not=DBG_
+
;; Based on optimized IR from C source:
;; int main () {
;; char a1[__INT_MAX__];
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/loop-hoist.ll b/llvm/test/DebugInfo/assignment-tracking/X86/loop-hoist.ll
index 559cdc59dffd9bf..c83d530c285269b 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/loop-hoist.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/loop-hoist.ll
@@ -1,6 +1,10 @@
; RUN: llc %s -stop-after=finalize-isel -o - \
; RUN: | FileCheck %s --implicit-check-not=DBG_
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - \
+; RUN: | FileCheck %s --implicit-check-not=DBG_
+
;; $ cat test.cpp
;; int d();
;; void e();
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/loop-sink.ll b/llvm/test/DebugInfo/assignment-tracking/X86/loop-sink.ll
index fcd51960b67cc68..77d730ff1d35998 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/loop-sink.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/loop-sink.ll
@@ -1,6 +1,10 @@
; RUN: llc %s -stop-after=finalize-isel -o - \
; RUN: | FileCheck %s --implicit-check-not=DBG
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - \
+; RUN: | FileCheck %s --implicit-check-not=DBG
+
;; Tiny loop with a store sunk out of it:
;; void e();
;; void es(int*);
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/loop-unroll.ll b/llvm/test/DebugInfo/assignment-tracking/X86/loop-unroll.ll
index 5ef5cb4dde9e1a5..51661d4b030c8e6 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/loop-unroll.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/loop-unroll.ll
@@ -1,5 +1,8 @@
; RUN: llc %s -stop-after=finalize-isel -o - \
; RUN: | FileCheck %s
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - \
+; RUN: | FileCheck %s
;;
;; Backend counterpart to ../Generic/dbg-assign-loop-unroll. This IR was
;; generated by running `opt -loop-unroll -S` on the IR in that test.
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/lower-offset-expression.ll b/llvm/test/DebugInfo/assignment-tracking/X86/lower-offset-expression.ll
index b4d85959af15bf7..2d0bf287079f050 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/lower-offset-expression.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/lower-offset-expression.ll
@@ -1,6 +1,10 @@
; RUN: llc %s -stop-after=finalize-isel -o - \
; RUN: | FileCheck %s
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - \
+; RUN: | FileCheck %s
+
;; Handwritten test.
;; Here we have dbg.assign intrinsics with fragments (in the value-expression)
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/lower-to-value.ll b/llvm/test/DebugInfo/assignment-tracking/X86/lower-to-value.ll
index 859056aff6337a8..28195bc22a62dd2 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/lower-to-value.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/lower-to-value.ll
@@ -2,11 +2,22 @@
; RUN: -experimental-debug-variable-locations=false \
; RUN: -debug-ata-coalesce-frags=true \
; RUN: | FileCheck %s --check-prefixes=CHECK,DBGVALUE --implicit-check-not=DBG_VALUE
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-before finalize-isel -o - \
+; RUN: -experimental-debug-variable-locations=false \
+; RUN: -debug-ata-coalesce-frags=true \
+; RUN: | FileCheck %s --check-prefixes=CHECK,DBGVALUE --implicit-check-not=DBG_VALUE
; RUN: llc %s -stop-before finalize-isel -o - \
; 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
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-before finalize-isel -o - \
+; 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
+
;; Check that dbg.assigns for an aggregate variable which lives on the stack
;; for some of its lifetime are lowered into an appropriate set of DBG_VALUEs.
;;
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
index 0ea8373cef5128f..0211fb7e74bd0f5 100644
--- 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
@@ -2,10 +2,20 @@
; RUN: -experimental-debug-variable-locations=false \
; RUN: -debug-ata-coalesce-frags=true \
; RUN: | FileCheck %s --implicit-check-not=DBG_
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-before finalize-isel -o - \
+; RUN: -experimental-debug-variable-locations=false \
+; RUN: -debug-ata-coalesce-frags=true \
+; RUN: | FileCheck %s --implicit-check-not=DBG_
; RUN: llc %s -stop-before finalize-isel -o - \
; RUN: -experimental-debug-variable-locations=true \
; RUN: | FileCheck %s --implicit-check-not=DBG_
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-before finalize-isel -o - \
+; RUN: -experimental-debug-variable-locations=true \
+; RUN: | FileCheck %s --implicit-check-not=DBG_
+
;; Check that the mem-loc-frag-fill pseudo-pass works on a simple CFG. When
;; LLVM sees a dbg.value with an overlapping fragment it essentially considers
;; the previous location as valid for all bits in that fragment. The pass
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
index 630678153de005d..597531aaf1d3f5e 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/mem-loc-frag-fill.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/mem-loc-frag-fill.ll
@@ -2,10 +2,20 @@
; RUN: -experimental-debug-variable-locations=false \
; RUN: -debug-ata-coalesce-frags=true \
; RUN: | FileCheck %s --implicit-check-not=DBG_
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-before finalize-isel -o - \
+; RUN: -experimental-debug-variable-locations=false \
+; RUN: -debug-ata-coalesce-frags=true \
+; RUN: | FileCheck %s --implicit-check-not=DBG_
; RUN: llc %s -stop-before finalize-isel -o - \
; RUN: -experimental-debug-variable-locations=true \
; RUN: | FileCheck %s --implicit-check-not=DBG_
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-before finalize-isel -o - \
+; RUN: -experimental-debug-variable-locations=true \
+; RUN: | FileCheck %s --implicit-check-not=DBG_
+
;; Check that the mem-loc-frag-fill analysis works on a simple case; ensure
;; that location definitions are added to preserve memory locations of
;; fragments of variables at subsequent location definitions for other
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/negative-offset.ll b/llvm/test/DebugInfo/assignment-tracking/X86/negative-offset.ll
index 74486c4822397a9..20ea85bd2737514 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/negative-offset.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/negative-offset.ll
@@ -1,5 +1,8 @@
; RUN: llc %s -stop-after=finalize-isel -o - | FileCheck %s --implicit-check-not=DBG_VALUE
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - | FileCheck %s --implicit-check-not=DBG_VALUE
+
;; Check stores to an address computed as a negative offset from an alloca are
;; ignored by the assignment tracking analysis. For this example that should
;; result in no DBG_VALUEs in the while.body.lr.ph branch.
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/nested-loop-frags.ll b/llvm/test/DebugInfo/assignment-tracking/X86/nested-loop-frags.ll
index 6e066fa90f4cb5f..39132dd5471b100 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/nested-loop-frags.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/nested-loop-frags.ll
@@ -1,6 +1,10 @@
; RUN: llc %s -stop-after=finalize-isel -o - \
; RUN: | FileCheck %s --implicit-check-not=DBG
+
+; RUN: llc --try-experimental-debuginfo-iterators %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
;; tracking analysis (debug-ata). This is similar to nested-loop.ll and
;; nested-loop-sroa.ll except that the allocas are 64 bits and the stores are a
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/nested-loop-sroa.ll b/llvm/test/DebugInfo/assignment-tracking/X86/nested-loop-sroa.ll
index 1f4351e6d3516a1..39c91724946f42e 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/nested-loop-sroa.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/nested-loop-sroa.ll
@@ -1,6 +1,10 @@
; RUN: llc %s -stop-after=finalize-isel -o - \
; RUN: | FileCheck %s --implicit-check-not=DBG
+
+; RUN: llc --try-experimental-debuginfo-iterators %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
;; tracking analysis (debug-ata). This is the same as nested-loop.ll except each
;; alloca holds a fragment of a variable instead of a whole variable.
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/nested-loop.ll b/llvm/test/DebugInfo/assignment-tracking/X86/nested-loop.ll
index 3f4350fd15af75a..b88a58566e4f6fa 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/nested-loop.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/nested-loop.ll
@@ -1,6 +1,10 @@
; RUN: llc %s -stop-after=finalize-isel -o - \
; RUN: | FileCheck %s --implicit-check-not=DBG
+
+; RUN: llc --try-experimental-debuginfo-iterators %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
;; tracking analysis (debug-ata).
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
index 626757e964dcd48..9ef3ea59247e7dc 100644
--- 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,6 +1,10 @@
; RUN: llc %s -o - -stop-after=finalize-isel \
; RUN: | FileCheck %s --implicit-check-not=DBG_
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -o - -stop-after=finalize-isel \
+; RUN: | FileCheck %s --implicit-check-not=DBG_
+
;; Hand written. Check that no unnecessary undef is inserted after an alloca
;; that has a linked dbg.assign that doesn't immediately follow it.
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/order-of-defs.ll b/llvm/test/DebugInfo/assignment-tracking/X86/order-of-defs.ll
index 191d61360feb4e8..9b8f3b9b67a3f99 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/order-of-defs.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/order-of-defs.ll
@@ -1,6 +1,10 @@
; RUN: llc %s -stop-after=finalize-isel -o - \
; RUN: | FileCheck %s --implicit-check-not=DBG_
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - \
+; RUN: | FileCheck %s --implicit-check-not=DBG_
+
;; Ensure that the order of several debug intrinsics between non-debug
;; instructions is maintained.
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/remove-redundant-defs-bwd-scan.ll b/llvm/test/DebugInfo/assignment-tracking/X86/remove-redundant-defs-bwd-scan.ll
index dc2638c69969d50..211098b4a8d555e 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/remove-redundant-defs-bwd-scan.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/remove-redundant-defs-bwd-scan.ll
@@ -1,6 +1,10 @@
; RUN: llc %s -stop-after=finalize-isel -o - \
; RUN: | FileCheck %s --implicit-check-not=DBG_
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - \
+; RUN: | FileCheck %s --implicit-check-not=DBG_
+
;; Hand-written to test assignment tracking analysis' removal of redundant
;; debug loc definitions. Checks written inline.
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
index b0628aecdc84976..5d52cc342cf2899 100644
--- 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,10 +1,19 @@
; RUN: llc %s -stop-before finalize-isel -o - \
; RUN: -experimental-debug-variable-locations=false \
; RUN: | FileCheck %s --check-prefixes=CHECK,DBGVALUE --implicit-check-not="DBG_VALUE \$noreg"
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-before finalize-isel -o - \
+; 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-debug-variable-locations=true \
; RUN: | FileCheck %s --check-prefixes=CHECK,INSTRREF --implicit-check-not="DBG_VALUE \$noreg"
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-before finalize-isel -o - \
+; RUN: -experimental-debug-variable-locations=true \
+; RUN: | FileCheck %s --check-prefixes=CHECK,INSTRREF --implicit-check-not="DBG_VALUE \$noreg"
+
;; Found in the wild, but this test involves modifications from:
;; int b;
;; void ext();
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/sdag-dangling-dbgassign.ll b/llvm/test/DebugInfo/assignment-tracking/X86/sdag-dangling-dbgassign.ll
index fc05d398e6fdb70..ba7d3f6a67e272b 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/sdag-dangling-dbgassign.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/sdag-dangling-dbgassign.ll
@@ -1,10 +1,19 @@
; RUN: llc %s -stop-before finalize-isel -o - \
; RUN: -experimental-debug-variable-locations=false \
; RUN: | FileCheck %s --check-prefixes=CHECK,DBGVALUE
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-before finalize-isel -o - \
+; RUN: -experimental-debug-variable-locations=false \
+; RUN: | FileCheck %s --check-prefixes=CHECK,DBGVALUE
; RUN: llc %s -stop-before finalize-isel -o - \
; RUN: -experimental-debug-variable-locations=true \
; RUN: | FileCheck %s --check-prefixes=CHECK,INSTRREF
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-before finalize-isel -o - \
+; RUN: -experimental-debug-variable-locations=true \
+; RUN: | FileCheck %s --check-prefixes=CHECK,INSTRREF
+
;--------------------------------------------------------------------
; Adapted from sdag-dangling-dbgvalue.ll to test dbg.assign intrinsics. This
; ensures that dbg.assigns with no linked store are treated as dbg.values. For
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
index 57a88bcdd3bcbe8..38a0a8675bef245 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/sdag-ir-salvage-assign.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/sdag-ir-salvage-assign.ll
@@ -2,11 +2,22 @@
; RUN: -stop-before finalize-isel %s -o - \
; RUN: -experimental-debug-variable-locations=false \
; RUN: | FileCheck %s --check-prefixes=CHECK,DBGVALUE
+
+; RUN: llc --try-experimental-debuginfo-iterators -mtriple=x86_64-unknown-unknown -start-after=codegenprepare \
+; 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: -stop-before finalize-isel %s -o - \
; RUN: -experimental-debug-variable-locations=true \
; RUN: | FileCheck %s --check-prefixes=CHECK,INSTRREF
+
+; RUN: llc --try-experimental-debuginfo-iterators -mtriple=x86_64-unknown-unknown -start-after=codegenprepare \
+; RUN: -stop-before finalize-isel %s -o - \
+; RUN: -experimental-debug-variable-locations=true \
+; RUN: | FileCheck %s --check-prefixes=CHECK,INSTRREF
+
; Adapted from sdag-ir-salvage.ll to test dbg.assign intrinsics. This ensures
; that dbg.assigns with no linked store are treated as dbg.values.
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/sdag-transfer-dbgassign.ll b/llvm/test/DebugInfo/assignment-tracking/X86/sdag-transfer-dbgassign.ll
index 1aea122f3cc2c93..fba127b5f5266e7 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/sdag-transfer-dbgassign.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/sdag-transfer-dbgassign.ll
@@ -1,10 +1,19 @@
; RUN: llc %s -start-after=codegenprepare -stop-before finalize-isel -o - \
; RUN: -experimental-debug-variable-locations=false \
; RUN: | FileCheck %s --check-prefixes=CHECK,DBGVALUE
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -start-after=codegenprepare -stop-before finalize-isel -o - \
+; 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-debug-variable-locations=true \
; RUN: | FileCheck %s --check-prefixes=CHECK,INSTRREF
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -start-after=codegenprepare -stop-before finalize-isel -o - \
+; RUN: -experimental-debug-variable-locations=true \
+; RUN: | FileCheck %s --check-prefixes=CHECK,INSTRREF
+
; Adapted from sdag-transfer-dbgvalue.ll to test dbg.assign intrinsics. This
; ensures that dbg.assigns with no linked store are treated as dbg.values.
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
index 485ee833ae2db26..1b2d047815755a3 100644
--- 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,6 +1,10 @@
; RUN: llc -stop-after=finalize-isel %s -o - \
; RUN: | FileCheck %s
+
+; RUN: llc --try-experimental-debuginfo-iterators -stop-after=finalize-isel %s -o - \
+; RUN: | FileCheck %s
+
;; Check that a dbg.assign for a fully stack-homed variable causes the variable
;; location to appear in the Machine Function side table. Similar to
;; single-memory-location.ll except this has slightly more complicated input
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/single-memory-location.ll b/llvm/test/DebugInfo/assignment-tracking/X86/single-memory-location.ll
index 1f806e5255fc518..a9cc55dbe84747c 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/single-memory-location.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/single-memory-location.ll
@@ -1,6 +1,10 @@
; RUN: llc -stop-after=finalize-isel %s -o - \
; RUN: | FileCheck %s
+
+; RUN: llc --try-experimental-debuginfo-iterators -stop-after=finalize-isel %s -o - \
+; RUN: | FileCheck %s
+
;; Check that a dbg.assign for a fully stack-homed variable causes the variable
;; location to appear in the Machine Function side table (variable 'local').
;;
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/split-alloca.ll b/llvm/test/DebugInfo/assignment-tracking/X86/split-alloca.ll
index 15f5374568bc369..045c9fd31af4c13 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/split-alloca.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/split-alloca.ll
@@ -1,6 +1,10 @@
; RUN: llc %s -o - -stop-after=finalize-isel \
; RUN: | FileCheck %s --implicit-check-not=DBG
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -o - -stop-after=finalize-isel \
+; RUN: | FileCheck %s --implicit-check-not=DBG
+
;; Hand written. Check that we fall back to emitting a list of defs for
;; variables with split allocas (i.e. we want to see DBG_VALUEs and no
;; debug-info-variable entry in the stack slot table).
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/untagged-store-assignment-extra-checks.ll b/llvm/test/DebugInfo/assignment-tracking/X86/untagged-store-assignment-extra-checks.ll
index c407a7da7fa2c2c..3dd9098df838218 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/untagged-store-assignment-extra-checks.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/untagged-store-assignment-extra-checks.ll
@@ -1,6 +1,10 @@
; RUN: llc %s -stop-after=finalize-isel -o - \
; RUN: | FileCheck %s --implicit-check-not=DBG_
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - \
+; RUN: | FileCheck %s --implicit-check-not=DBG_
+
;; Similarly to untagged-store-assignment-outside-variable.ll this test checks
;; that out of bounds stores that have no DIAssignID are interpreted correctly
;; (see inline comments and checks). Hand-written IR.
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/untagged-store-assignment-outside-variable.ll b/llvm/test/DebugInfo/assignment-tracking/X86/untagged-store-assignment-outside-variable.ll
index 3a7c528d320a738..fe1af199d5e7ea4 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/untagged-store-assignment-outside-variable.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/untagged-store-assignment-outside-variable.ll
@@ -1,6 +1,10 @@
; RUN: llc %s -stop-after=finalize-isel -o - \
; RUN: | FileCheck %s --implicit-check-not=DBG_
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - \
+; RUN: | FileCheck %s --implicit-check-not=DBG_
+
;; Generated from following C source that contains UB (read and write to
;; out of bounds static array element.
;; int a;
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
index ebab33f73c86bb7..cbe9af2f7d81822 100644
--- 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,6 +1,10 @@
; RUN: llc %s -stop-after=finalize-isel -o - \
; RUN: | FileCheck %s --implicit-check-not=DBG_VALUE
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - \
+; RUN: | FileCheck %s --implicit-check-not=DBG_VALUE
+
;; Check that sandwiching instructions between a linked store and dbg.assign
;; results in a dbg.value(prev_value) being inserted at the store, and a
;; dbg.value(deref) at the dbg.assign.
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
index d85784f1b56c956..135123ef8606643 100644
--- 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,6 +1,10 @@
; RUN: llc %s -stop-after=finalize-isel -o - \
; RUN: | FileCheck %s --implicit-check-not=DBG_VALUE
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - \
+; RUN: | FileCheck %s --implicit-check-not=DBG_VALUE
+
;; Check that sandwiching instructions between a linked store and dbg.assign
;; results in a dbg.value(prev_value) being inserted at the store, and a
;; dbg.value(deref) at the dbg.assign.
More information about the llvm-commits
mailing list