Skip to content

Commit f5ecda0

Browse files
committed
Add di_subprogram to TargetOp in testcases.
1 parent 6980476 commit f5ecda0

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

mlir/test/Target/LLVMIR/omptarget-debug-loop-loc.mlir

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ module attributes {dlti.dl_spec = #dlti.dl_spec<#dlti.dl_entry<"dlti.alloca_memo
4141
omp.terminator loc(#loc9)
4242
} loc(#loc9)
4343
omp.terminator loc(#loc9)
44-
} loc(#loc9)
44+
} loc(#loc15)
4545
llvm.return loc(#loc9)
4646
} loc(#loc14)
4747
llvm.mlir.global internal @_QFEarray() {addr_space = 0 : i32} : !llvm.array<16384 x i32> {
@@ -59,7 +59,9 @@ module attributes {dlti.dl_spec = #dlti.dl_spec<#dlti.dl_entry<"dlti.alloca_memo
5959
#di_compile_unit = #llvm.di_compile_unit<id = distinct[0]<>, sourceLanguage = DW_LANG_Fortran95, file = #di_file, producer = "flang", isOptimized = true, emissionKind = LineTablesOnly>
6060
#di_subroutine_type = #llvm.di_subroutine_type<callingConvention = DW_CC_program, types = #di_null_type>
6161
#di_subprogram = #llvm.di_subprogram<id = distinct[1]<>, compileUnit = #di_compile_unit, scope = #di_file, name = "main", file = #di_file, subprogramFlags = "Definition|Optimized|MainSubprogram", type = #di_subroutine_type>
62+
#di_subprogram1 = #llvm.di_subprogram<compileUnit = #di_compile_unit, name = "target", file = #di_file, subprogramFlags = "Definition", type = #di_subroutine_type>
6263
#loc14 = loc(fused<#di_subprogram>[#loc3])
64+
#loc15 = loc(fused<#di_subprogram1>[#loc9])
6365

6466

6567
// CHECK: call void @__kmpc_distribute_static{{.*}}!dbg

mlir/test/Target/LLVMIR/omptarget-debug-map-link-loc.mlir

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module attributes {dlti.dl_spec = #dlti.dl_spec<#dlti.dl_entry<"dlti.alloca_memo
1616
%16 = llvm.load %arg1 : !llvm.ptr -> i32 loc(#loc5)
1717
llvm.store %16, %arg0 : i32, !llvm.ptr loc(#loc5)
1818
omp.terminator loc(#loc5)
19-
} loc(#loc5)
19+
} loc(#loc16)
2020
llvm.return loc(#loc6)
2121
} loc(#loc15)
2222
}
@@ -31,9 +31,13 @@ module attributes {dlti.dl_spec = #dlti.dl_spec<#dlti.dl_entry<"dlti.alloca_memo
3131
compileUnit = #di_compile_unit, scope = #di_file, name = "main",
3232
file = #di_file, subprogramFlags = "Definition|MainSubprogram",
3333
type = #di_subroutine_type>
34+
#di_subprogram1 = #llvm.di_subprogram<compileUnit = #di_compile_unit,
35+
name = "target", file = #di_file, subprogramFlags = "Definition",
36+
type = #di_subroutine_type>
3437
#loc1 = loc("test.f90":3:18)
3538
#loc2 = loc("test.f90":7:7)
3639
#loc3 = loc("test.f90":9:18)
3740
#loc5 = loc("test.f90":11:7)
3841
#loc6 = loc("test.f90":12:7)
3942
#loc15 = loc(fused<#di_subprogram>[#loc2])
43+
#loc16 = loc(fused<#di_subprogram1>[#loc5])

0 commit comments

Comments
 (0)