Skip to content

Commit 5ee0881

Browse files
authored
[DebugInfo][RemoveDIs] Handle dbg.declares in SelectionDAGISel (#73496)
This is a boring mechanical update to support DPValues that look like dbg.declares in SelectionDAG. The tests will become "live" once #74090 lands (see for more info).
1 parent b204321 commit 5ee0881

26 files changed

+134
-52
lines changed

llvm/include/llvm/CodeGen/FunctionLoweringInfo.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ class FunctionLoweringInfo {
191191
/// Collection of dbg.declare instructions handled after argument
192192
/// lowering and before ISel proper.
193193
SmallPtrSet<const DbgDeclareInst *, 8> PreprocessedDbgDeclares;
194+
SmallPtrSet<const DPValue *, 8> PreprocessedDPVDeclares;
194195

195196
/// set - Initialize this FunctionLoweringInfo with the given Function
196197
/// and its associated MachineFunction.

llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,7 @@ void FunctionLoweringInfo::clear() {
357357
StatepointRelocationMaps.clear();
358358
PreferredExtendType.clear();
359359
PreprocessedDbgDeclares.clear();
360+
PreprocessedDPVDeclares.clear();
360361
}
361362

362363
/// CreateReg - Allocate a single virtual register for the given type.

llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp

Lines changed: 70 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1148,6 +1148,60 @@ SDValue SelectionDAGBuilder::getControlRoot() {
11481148
return updateRoot(PendingExports);
11491149
}
11501150

1151+
void SelectionDAGBuilder::handleDebugDeclare(Value *Address,
1152+
DILocalVariable *Variable,
1153+
DIExpression *Expression,
1154+
DebugLoc DL) {
1155+
assert(Variable && "Missing variable");
1156+
1157+
// Check if address has undef value.
1158+
if (!Address || isa<UndefValue>(Address) ||
1159+
(Address->use_empty() && !isa<Argument>(Address))) {
1160+
LLVM_DEBUG(
1161+
dbgs()
1162+
<< "dbg_declare: Dropping debug info (bad/undef/unused-arg address)\n");
1163+
return;
1164+
}
1165+
1166+
bool IsParameter = Variable->isParameter() || isa<Argument>(Address);
1167+
1168+
SDValue &N = NodeMap[Address];
1169+
if (!N.getNode() && isa<Argument>(Address))
1170+
// Check unused arguments map.
1171+
N = UnusedArgNodeMap[Address];
1172+
SDDbgValue *SDV;
1173+
if (N.getNode()) {
1174+
if (const BitCastInst *BCI = dyn_cast<BitCastInst>(Address))
1175+
Address = BCI->getOperand(0);
1176+
// Parameters are handled specially.
1177+
auto *FINode = dyn_cast<FrameIndexSDNode>(N.getNode());
1178+
if (IsParameter && FINode) {
1179+
// Byval parameter. We have a frame index at this point.
1180+
SDV = DAG.getFrameIndexDbgValue(Variable, Expression, FINode->getIndex(),
1181+
/*IsIndirect*/ true, DL, SDNodeOrder);
1182+
} else if (isa<Argument>(Address)) {
1183+
// Address is an argument, so try to emit its dbg value using
1184+
// virtual register info from the FuncInfo.ValueMap.
1185+
EmitFuncArgumentDbgValue(Address, Variable, Expression, DL,
1186+
FuncArgumentDbgValueKind::Declare, N);
1187+
return;
1188+
} else {
1189+
SDV = DAG.getDbgValue(Variable, Expression, N.getNode(), N.getResNo(),
1190+
true, DL, SDNodeOrder);
1191+
}
1192+
DAG.AddDbgValue(SDV, IsParameter);
1193+
} else {
1194+
// If Address is an argument then try to emit its dbg value using
1195+
// virtual register info from the FuncInfo.ValueMap.
1196+
if (!EmitFuncArgumentDbgValue(Address, Variable, Expression, DL,
1197+
FuncArgumentDbgValueKind::Declare, N)) {
1198+
LLVM_DEBUG(dbgs() << "dbg_declare: Dropping debug info"
1199+
<< " (could not emit func-arg dbg_value)\n");
1200+
}
1201+
}
1202+
return;
1203+
}
1204+
11511205
void SelectionDAGBuilder::visitDbgInfo(const Instruction &I) {
11521206
// Add SDDbgValue nodes for any var locs here. Do so before updating
11531207
// SDNodeOrder, as this mapping is {Inst -> Locs BEFORE Inst}.
@@ -1182,6 +1236,16 @@ void SelectionDAGBuilder::visitDbgInfo(const Instruction &I) {
11821236
DIExpression *Expression = DPV.getExpression();
11831237
dropDanglingDebugInfo(Variable, Expression);
11841238

1239+
if (DPV.getType() == DPValue::LocationType::Declare) {
1240+
if (FuncInfo.PreprocessedDPVDeclares.contains(&DPV))
1241+
continue;
1242+
LLVM_DEBUG(dbgs() << "SelectionDAG visiting dbg_declare: " << DPV
1243+
<< "\n");
1244+
handleDebugDeclare(DPV.getVariableLocationOp(0), Variable, Expression,
1245+
DPV.getDebugLoc());
1246+
continue;
1247+
}
1248+
11851249
// A DPValue with no locations is a kill location.
11861250
SmallVector<Value *, 4> Values(DPV.location_ops());
11871251
if (Values.empty()) {
@@ -6218,61 +6282,15 @@ void SelectionDAGBuilder::visitIntrinsicCall(const CallInst &I,
62186282
if (AssignmentTrackingEnabled ||
62196283
FuncInfo.PreprocessedDbgDeclares.count(&DI))
62206284
return;
6221-
// Assume dbg.declare can not currently use DIArgList, i.e.
6222-
// it is non-variadic.
6223-
assert(!DI.hasArgList() && "Only dbg.value should currently use DIArgList");
6285+
LLVM_DEBUG(dbgs() << "SelectionDAG visiting dbg_declare: " << DI << "\n");
62246286
DILocalVariable *Variable = DI.getVariable();
62256287
DIExpression *Expression = DI.getExpression();
62266288
dropDanglingDebugInfo(Variable, Expression);
6227-
assert(Variable && "Missing variable");
6228-
LLVM_DEBUG(dbgs() << "SelectionDAG visiting debug intrinsic: " << DI
6229-
<< "\n");
6230-
// Check if address has undef value.
6231-
const Value *Address = DI.getVariableLocationOp(0);
6232-
if (!Address || isa<UndefValue>(Address) ||
6233-
(Address->use_empty() && !isa<Argument>(Address))) {
6234-
LLVM_DEBUG(dbgs() << "Dropping debug info for " << DI
6235-
<< " (bad/undef/unused-arg address)\n");
6236-
return;
6237-
}
6238-
6239-
bool isParameter = Variable->isParameter() || isa<Argument>(Address);
6240-
6241-
SDValue &N = NodeMap[Address];
6242-
if (!N.getNode() && isa<Argument>(Address))
6243-
// Check unused arguments map.
6244-
N = UnusedArgNodeMap[Address];
6245-
SDDbgValue *SDV;
6246-
if (N.getNode()) {
6247-
if (const BitCastInst *BCI = dyn_cast<BitCastInst>(Address))
6248-
Address = BCI->getOperand(0);
6249-
// Parameters are handled specially.
6250-
auto FINode = dyn_cast<FrameIndexSDNode>(N.getNode());
6251-
if (isParameter && FINode) {
6252-
// Byval parameter. We have a frame index at this point.
6253-
SDV =
6254-
DAG.getFrameIndexDbgValue(Variable, Expression, FINode->getIndex(),
6255-
/*IsIndirect*/ true, dl, SDNodeOrder);
6256-
} else if (isa<Argument>(Address)) {
6257-
// Address is an argument, so try to emit its dbg value using
6258-
// virtual register info from the FuncInfo.ValueMap.
6259-
EmitFuncArgumentDbgValue(Address, Variable, Expression, dl,
6260-
FuncArgumentDbgValueKind::Declare, N);
6261-
return;
6262-
} else {
6263-
SDV = DAG.getDbgValue(Variable, Expression, N.getNode(), N.getResNo(),
6264-
true, dl, SDNodeOrder);
6265-
}
6266-
DAG.AddDbgValue(SDV, isParameter);
6267-
} else {
6268-
// If Address is an argument then try to emit its dbg value using
6269-
// virtual register info from the FuncInfo.ValueMap.
6270-
if (!EmitFuncArgumentDbgValue(Address, Variable, Expression, dl,
6271-
FuncArgumentDbgValueKind::Declare, N)) {
6272-
LLVM_DEBUG(dbgs() << "Dropping debug info for " << DI
6273-
<< " (could not emit func-arg dbg_value)\n");
6274-
}
6275-
}
6289+
// Assume dbg.declare can not currently use DIArgList, i.e.
6290+
// it is non-variadic.
6291+
assert(!DI.hasArgList() && "Only dbg.value should currently use DIArgList");
6292+
handleDebugDeclare(DI.getVariableLocationOp(0), Variable, Expression,
6293+
DI.getDebugLoc());
62766294
return;
62776295
}
62786296
case Intrinsic::dbg_label: {

llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,9 @@ class SelectionDAGBuilder {
368368
void handleKillDebugValue(DILocalVariable *Var, DIExpression *Expr,
369369
DebugLoc DbgLoc, unsigned Order);
370370

371+
void handleDebugDeclare(Value *Address, DILocalVariable *Variable,
372+
DIExpression *Expression, DebugLoc DL);
373+
371374
/// Evict any dangling debug information, attempting to salvage it first.
372375
void resolveOrClearDbgInfo();
373376

llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1461,6 +1461,14 @@ static void processDbgDeclares(FunctionLoweringInfo &FuncInfo) {
14611461
if (DI && processDbgDeclare(FuncInfo, DI->getAddress(), DI->getExpression(),
14621462
DI->getVariable(), DI->getDebugLoc()))
14631463
FuncInfo.PreprocessedDbgDeclares.insert(DI);
1464+
1465+
for (const DPValue &DPV : I.getDbgValueRange()) {
1466+
if (DPV.getType() == DPValue::LocationType::Declare &&
1467+
processDbgDeclare(FuncInfo, DPV.getVariableLocationOp(0),
1468+
DPV.getExpression(), DPV.getVariable(),
1469+
DPV.getDebugLoc()))
1470+
FuncInfo.PreprocessedDPVDeclares.insert(&DPV);
1471+
}
14641472
}
14651473
}
14661474

llvm/test/CodeGen/X86/dbg-combine.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
; RUN: llc -mtriple x86_64-pc-linux -O0 < %s | FileCheck %s
2+
; RUN: llc --try-experimental-debuginfo-iterators -mtriple x86_64-pc-linux -O0 < %s | FileCheck %s
23

34
; Make sure that the sequence of debug locations for function foo is correctly
45
; generated. More specifically, .loc entries for lines 4,5,6,7 must appear in

llvm/test/CodeGen/X86/selectiondag-order.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
; Check that debug intrinsics do not affect code generation.
22

33
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx | FileCheck --check-prefix=X86-CHECK %s
4+
; RUN: llc --try-experimental-debuginfo-iterators < %s -mtriple=x86_64-unknown-unknown -mattr=+avx | FileCheck --check-prefix=X86-CHECK %s
45

56
define i64 @simulate(<2 x i32> %a) {
67
entry:

llvm/test/DebugInfo/Generic/2010-06-29-InlinedFnLocalVar.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
; RUN: %llc_dwarf -O2 %s -o - | FileCheck %s
2+
; RUN: %llc_dwarf --try-experimental-debuginfo-iterators -O2 %s -o - | FileCheck %s
23
; Check struct X for dead variable xyz from inlined function foo.
34

45
; CHECK: {{.section.*debug_info|.*dwinfo:}}

llvm/test/DebugInfo/Mips/InlinedFnLocalVar.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
; RUN: llc -mtriple mips-linux-gnu -O2 %s -o - | FileCheck %s
2+
; RUN: llc --try-experimental-debuginfo-iterators -mtriple mips-linux-gnu -O2 %s -o - | FileCheck %s
23
; Check struct X for dead variable xyz from inlined function foo.
34

45
; CHECK: .section .debug_info,"",@0x7000001e

llvm/test/DebugInfo/X86/DW_AT_const_value.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
; RUN: llc %s -o - | FileCheck %s
2+
; RUN: llc --try-experimental-debuginfo-iterators %s -o - | FileCheck %s
23

34
;; Check single location variables of various types with a constant value are
45
;; emitted with a DW_AT_const_value attribute.

llvm/test/DebugInfo/X86/InlinedFnLocalVar.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
; RUN: llc -mtriple i686-pc-cygwin -O2 %s -o - | FileCheck %s
2+
; RUN: llc --try-experimental-debuginfo-iterators -mtriple i686-pc-cygwin -O2 %s -o - | FileCheck %s
23
; Check struct X for dead variable xyz from inlined function foo.
34

45
; CHECK: Lsection_info

llvm/test/DebugInfo/X86/block-capture.ll

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
; RUN: llc %s -o %t -filetype=obj
22
; RUN: llvm-dwarfdump -v -debug-info %t | FileCheck %s
33

4+
; RUN: llc --try-experimental-debuginfo-iterators %s -o %t -filetype=obj
5+
; RUN: llvm-dwarfdump -v -debug-info %t | FileCheck %s
6+
47
; Checks that we emit debug info for the block variable declare.
58
; CHECK: DW_TAG_subprogram
69
; CHECK: DW_TAG_variable

llvm/test/DebugInfo/X86/dbg-empty-metadata-lowering.ll

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,19 @@
22
; RUN: | FileCheck %s --implicit-check-not=DBG --check-prefixes=AT-DISABLED,BOTH
33
; RUN: llc %s -stop-after=finalize-isel -o - --try-experimental-debuginfo-iterators \
44
; RUN: | FileCheck %s --implicit-check-not=DBG --check-prefixes=AT-DISABLED,BOTH
5+
; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - \
6+
; RUN: | FileCheck %s --implicit-check-not=DBG --check-prefixes=AT-DISABLED,BOTH
7+
58
;; Check that dbg.values with empty metadata are treated as kills (i.e. become
69
;; DBG_VALUE $noreg, ...). dbg.declares with empty metadata location operands
710
;; should be ignored.
811

912
; RUN: sed 's/;Uncomment-with-sed//g' < %s \
1013
; RUN: | llc -stop-after=finalize-isel -o - \
1114
; RUN: | FileCheck %s --implicit-check-not=DBG --check-prefixes=AT-ENABLED,BOTH
15+
; RUN: sed 's/;Uncomment-with-sed//g' < %s \
16+
; RUN: | llc --try-experimental-debuginfo-iterators -stop-after=finalize-isel -o - \
17+
; RUN: | FileCheck %s --implicit-check-not=DBG --check-prefixes=AT-ENABLED,BOTH
1218
;; Check the same behaviour occurs with assignment tracking enabled.
1319

1420
;; First ensure assignment tracking is truly unset/set.

llvm/test/DebugInfo/X86/debug-info-block-captured-self.ll

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
; RUN: llc -mtriple x86_64-apple-darwin -filetype=obj -o %t.o < %s
22
; RUN: llvm-dwarfdump %t.o | FileCheck %s
33
;
4+
; RUN: llc --try-experimental-debuginfo-iterators -mtriple x86_64-apple-darwin -filetype=obj -o %t.o < %s
5+
; RUN: llvm-dwarfdump %t.o | FileCheck %s
6+
;
47
; Test that DW_AT_location is generated for a captured "self" inside a
58
; block.
69
;

llvm/test/DebugInfo/X86/debug-info-blocks.ll

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
; RUN: llc -mtriple x86_64-apple-darwin -filetype=obj -o %t.o < %s
22
; RUN: llvm-dwarfdump -v -debug-info %t.o | FileCheck %s
33

4+
; RUN: llc --try-experimental-debuginfo-iterators -mtriple x86_64-apple-darwin -filetype=obj -o %t.o < %s
5+
; RUN: llvm-dwarfdump -v -debug-info %t.o | FileCheck %s
6+
47
; Generated from llvm/tools/clang/test/CodeGenObjC/debug-info-blocks.m
58
; rdar://problem/9279956
69
; test that the DW_AT_location of self is at ( fbreg +{{[0-9]+}}, deref, +{{[0-9]+}} )

llvm/test/DebugInfo/X86/empty-metadata-dbg-declare.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
; RUN: llc %s -stop-after=finalize-isel -o - | FileCheck %s --implicit-check-not=DBG
2+
; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - | FileCheck %s --implicit-check-not=DBG
23

34
;; Check that a single "empty metadata" dbg.declare doesn't accidentally cause
45
;; other dbg.declares in the function to go missing.

llvm/test/DebugInfo/X86/pieces-3.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
; RUN: llc %s -filetype=obj -o - -experimental-debug-variable-locations=true | llvm-dwarfdump -v - | FileCheck %s
2+
; RUN: llc --try-experimental-debuginfo-iterators %s -filetype=obj -o - -experimental-debug-variable-locations=true | llvm-dwarfdump -v - | FileCheck %s
23
;
34
; // Compile with -O1
45
; typedef struct {

llvm/test/DebugInfo/X86/pieces-4.ll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
; RUN: llc < %s -experimental-debug-variable-locations=true | FileCheck %s
22
; RUN: llc -filetype=obj < %s -experimental-debug-variable-locations=true | llvm-dwarfdump -debug-loc - | FileCheck %s --check-prefix=DWARF
3+
; RUN: llc --try-experimental-debuginfo-iterators < %s -experimental-debug-variable-locations=true | FileCheck %s
4+
; RUN: llc --try-experimental-debuginfo-iterators -filetype=obj < %s -experimental-debug-variable-locations=true | llvm-dwarfdump -debug-loc - | FileCheck %s --check-prefix=DWARF
35

46
; Compile the following with -O1:
57

llvm/test/DebugInfo/X86/safestack-byval.ll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
; SafeStack for unsafe byval arguments.
44
; RUN: llc -mtriple=x86_64-unknown-unknown --experimental-debug-variable-locations=false -stop-after finalize-isel %s -o - | FileCheck %s --check-prefixes=CHECK,NORMAL
55
; RUN: llc -mtriple=x86_64-unknown-unknown --experimental-debug-variable-locations -stop-after finalize-isel %s -o - | FileCheck %s --check-prefixes=CHECK,INSTRREF
6+
; RUN: llc --try-experimental-debuginfo-iterators -mtriple=x86_64-unknown-unknown --experimental-debug-variable-locations=false -stop-after finalize-isel %s -o - | FileCheck %s --check-prefixes=CHECK,NORMAL
7+
; RUN: llc --try-experimental-debuginfo-iterators -mtriple=x86_64-unknown-unknown --experimental-debug-variable-locations -stop-after finalize-isel %s -o - | FileCheck %s --check-prefixes=CHECK,INSTRREF
68

79
; This was built by compiling the following source with SafeStack and
810
; simplifying the result a little.

llvm/test/DebugInfo/X86/salvage-add-node-indirect.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 3
22
; RUN: llc -mtriple=x86_64 %s -start-before=x86-isel -o - -stop-after=x86-isel | FileCheck %s
3+
; RUN: llc --try-experimental-debuginfo-iterators -mtriple=x86_64 %s -start-before=x86-isel -o - -stop-after=x86-isel | FileCheck %s
34

45
; Verify that we don't crash due to attempting to turn the indirect debug value
56
; in @test_non_constant variadic when salvaging the ADD node with non-constant

llvm/test/DebugInfo/X86/spill-indirect-nrvo.ll

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
; RUN: llc < %s -experimental-debug-variable-locations=true | FileCheck -check-prefixes=CHECK,OPT %s
44
; RUN: llc -O0 < %s -experimental-debug-variable-locations=true | FileCheck -check-prefixes=CHECK,OPTNONE %s
55

6+
; RUN: llc --try-experimental-debuginfo-iterators < %s -experimental-debug-variable-locations=false | FileCheck -check-prefixes=CHECK,OPT %s
7+
;; FIXME: RemoveDIs - enable when FastISel support is added.
8+
; run: llc --try-experimental-debuginfo-iterators -O0 < %s -experimental-debug-variable-locations=false | FileCheck -check-prefixes=CHECK,OPTNONE %s
9+
; RUN: llc --try-experimental-debuginfo-iterators < %s -experimental-debug-variable-locations=true | FileCheck -check-prefixes=CHECK,OPT %s
10+
;; FIXME: RemoveDIs - enable when FastISel support is added.
11+
; run: llc --try-experimental-debuginfo-iterators -O0 < %s -experimental-debug-variable-locations=true | FileCheck -check-prefixes=CHECK,OPTNONE %s
12+
613
; Make sure we insert DW_OP_deref when spilling indirect DBG_VALUE instructions.
714

815
; C++ source:

llvm/test/DebugInfo/X86/spill-nontrivial-param.ll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
; RUN: llc < %s -experimental-debug-variable-locations=false | FileCheck %s
22
; RUN: llc < %s -experimental-debug-variable-locations=true | FileCheck %s
3+
; RUN: llc --try-experimental-debuginfo-iterators < %s -experimental-debug-variable-locations=false | FileCheck %s
4+
; RUN: llc --try-experimental-debuginfo-iterators < %s -experimental-debug-variable-locations=true | FileCheck %s
35

46
; Make sure we insert DW_OP_deref when spilling indirect DBG_VALUE instructions.
57
; In this example, 'nt' is passed by address because it is not trivially

llvm/test/DebugInfo/X86/sret.ll

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
; RUN: llc -split-dwarf-file=foo.dwo -O0 %s -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o %t
22
; RUN: llvm-dwarfdump -debug-info %t | FileCheck %s --check-prefix=CHECK-DWO
3+
;; FIXME: RemoveDIs - enable when FastISel support is added.
4+
; run: llc --try-experimental-debuginfo-iterators -split-dwarf-file=foo.dwo -O0 %s -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o %t
5+
; run: llvm-dwarfdump -debug-info %t | FileCheck %s --check-prefix=CHECK-DWO
36

47
; Based on the debuginfo-tests/sret.cpp code.
58

@@ -8,6 +11,11 @@
811

912
; RUN: llc -O0 -fast-isel=true -mtriple=x86_64-apple-darwin -filetype=obj -o - %s | llvm-dwarfdump -debug-info - | FileCheck -check-prefixes=CHECK,FASTISEL %s
1013
; RUN: llc -O0 -fast-isel=false -mtriple=x86_64-apple-darwin -filetype=obj -o - %s | llvm-dwarfdump -debug-info - | FileCheck -check-prefixes=CHECK,SDAG %s
14+
15+
; RUN: llc --try-experimental-debuginfo-iterators -O0 -fast-isel=false -mtriple=x86_64-apple-darwin -filetype=obj -o - %s | llvm-dwarfdump -debug-info - | FileCheck -check-prefixes=CHECK,SDAG %s
16+
;; FIXME: RemoveDIs - enable when FastISel support is added.
17+
; run: llc --try-experimental-debuginfo-iterators -O0 -fast-isel=false -mtriple=x86_64-apple-darwin -filetype=obj -o - %s | llvm-dwarfdump -debug-info - | FileCheck -check-prefixes=CHECK,SDAG %s
18+
1119
; CHECK: _ZN1B9AInstanceEv
1220
; CHECK: DW_TAG_variable
1321
; CHECK-NEXT: DW_AT_location (0x00000000

llvm/test/DebugInfo/X86/union-const.ll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
; RUN: llc -filetype=obj < %s | llvm-dwarfdump -v -debug-info - | FileCheck %s
2+
; RUN: llc --try-experimental-debuginfo-iterators -filetype=obj < %s | llvm-dwarfdump -v -debug-info - | FileCheck %s
3+
24
; CHECK: DW_TAG_variable
35
; CHECK-NEXT: DW_AT_const_value [DW_FORM_udata] (0)
46
; CHECK-NEXT: DW_AT_name {{.*}}"a"

llvm/test/DebugInfo/X86/vla-global.ll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
; RUN: llc -mtriple=x86_64-apple-darwin %s -o - -filetype=obj | llvm-dwarfdump - | FileCheck %s
2+
; RUN: llc --try-experimental-debuginfo-iterators -mtriple=x86_64-apple-darwin %s -o - -filetype=obj | llvm-dwarfdump - | FileCheck %s
3+
24
; CHECK: 0x00000[[G:.*]]: DW_TAG_variable
35
; CHECK-NEXT: DW_AT_name ("g")
46
; CHECK: DW_TAG_array_type

llvm/test/DebugInfo/X86/vla-multi.ll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
; RUN: llc -mtriple=x86_64-apple-darwin %s -o - -filetype=obj | llvm-dwarfdump - | FileCheck %s
2+
; RUN: llc --try-experimental-debuginfo-iterators -mtriple=x86_64-apple-darwin %s -o - -filetype=obj | llvm-dwarfdump - | FileCheck %s
3+
24
; Test debug info for multidimensional arrays.
35
;
46
; void f(int i, int j, int k, int r) {

0 commit comments

Comments
 (0)