Skip to content

Commit 9b6db68

Browse files
authored
Merge pull request #860 from hvdijk/llvm21-update
[LLVM 21] Accept arguments, remove DW_CC_LLVM_OpenCLKernel.
2 parents fa794b5 + 676c1e0 commit 9b6db68

8 files changed

Lines changed: 11 additions & 36 deletions

File tree

modules/compiler/targets/host/source/target.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,9 +382,9 @@ compiler::Result HostTarget::initWithBuiltins(
382382
// Customize the JIT linking layer to provide better profiler/debugger
383383
// integration.
384384
Builder.setObjectLinkingLayerCreator(
385-
[&](llvm::orc::ExecutionSession &ES, auto...)
385+
[&](llvm::orc::ExecutionSession &ES, auto &&...)
386386
-> llvm::Expected<std::unique_ptr<llvm::orc::ObjectLayer>> {
387-
auto GetMemMgr = []() {
387+
auto GetMemMgr = [](auto &&...) {
388388
return std::make_unique<llvm::SectionMemoryManager>();
389389
};
390390
auto ObjLinkingLayer =

modules/compiler/test/lit/passes/add-kernel-wrapper-dbg.ll

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,6 @@ attributes #0 = { "mux-kernel"="entry-point" }
5555

5656
!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 16.0.4", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug)
5757
!1 = !DIFile(filename: "add-kernel-wrapper-dbg.ll", directory: "/tmp")
58-
!2 = !DISubroutineType(cc: DW_CC_LLVM_OpenCLKernel, types: !3)
59-
!3 = !{!4, !4}
60-
!4 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !5, size: 64, dwarfAddressSpace: 1)
61-
!5 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
6258
!6 = !{i32 2, !"Debug Info Version", i32 3}
6359

64-
!10 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 2, type: !2, scopeLine: 2, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0)
60+
!10 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 2, scopeLine: 2, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0)

modules/compiler/test/lit/passes/barriers-dbg-loop-name.ll

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,8 @@ attributes #5 = { convergent nounwind readonly willreturn }
114114
!10 = !{!"kernel_arg_type_qual", !"", !"", !"", !"", !"const", !"", !"", !"", !"", !""}
115115
!11 = !{!"kernel_arg_name", !"in1", !"in2", !"in3", !"in4", !"in5", !"in6", !"in7", !"in8", !"in9", !"out"}
116116
!12 = !{!""}
117-
!13 = distinct !DISubprogram(name: "test_args", scope: !14, file: !14, line: 9, type: !15, scopeLine: 19, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !42)
117+
!13 = distinct !DISubprogram(name: "test_args", scope: !14, file: !14, line: 9, scopeLine: 19, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !42)
118118
!14 = !DIFile(filename: "kernel.opencl", directory: "test")
119-
!15 = !DISubroutineType(cc: DW_CC_LLVM_OpenCLKernel, types: !16)
120-
!16 = !{null, !17, !19, !26, !27, !28, !17, !29, !32, !37, !17}
121119
!17 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !18, size: 64, dwarfAddressSpace: 1)
122120
!18 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
123121
!19 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !20, size: 64, dwarfAddressSpace: 1)

modules/compiler/test/lit/passes/barriers-dbg.ll

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,10 +238,8 @@ attributes #6 = { convergent nounwind readonly willreturn }
238238
!10 = !{!"kernel_arg_type_qual", !"const", !""}
239239
!11 = !{!"kernel_arg_name", !"input", !"output"}
240240
!12 = !{!""}
241-
!13 = distinct !DISubprogram(name: "barrier_test", scope: !14, file: !14, line: 11, type: !15, scopeLine: 11, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !21)
241+
!13 = distinct !DISubprogram(name: "barrier_test", scope: !14, file: !14, line: 11, scopeLine: 11, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !21)
242242
!14 = !DIFile(filename: "kernel.opencl", directory: "test")
243-
!15 = !DISubroutineType(cc: DW_CC_LLVM_OpenCLKernel, types: !16)
244-
!16 = !{null, !17, !20}
245243
!17 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !18, size: 64, dwarfAddressSpace: 1)
246244
!18 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !19)
247245
!19 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)

modules/compiler/test/lit/passes/printf-errors.ll

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,8 @@ declare spir_func i32 @printf(ptr addrspace(2), ...)
6464
!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !4, isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug)
6565
!2 = !{i32 2, !"Debug Info Version", i32 3}
6666

67-
!3 = distinct !DISubprogram(name: "do_printf", scope: !4, file: !4, line: 1, type: !5, scopeLine: 1, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0)
67+
!3 = distinct !DISubprogram(name: "do_printf", scope: !4, file: !4, line: 1, scopeLine: 1, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0)
6868
!4 = !DIFile(filename: "/tmp/printf.cl", directory: "")
69-
!5 = !DISubroutineType(cc: DW_CC_LLVM_OpenCLKernel, types: !6)
70-
!6 = !{null, !7}
71-
!7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !8, size: 64, dwarfAddressSpace: 1)
72-
!8 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
7369

7470
!9 = !DILocation(line: 3, scope: !3)
7571
!10 = !DILocation(line: 4, scope: !3)

modules/compiler/test/lit/passes/replace-local-module-scope-vars-dbg-2.ll

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -106,24 +106,14 @@ attributes #1 = { nounwind "mux-kernel"="entry-point" }
106106
!6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
107107
!7 = !{i32 2, !"Debug Info Version", i32 3}
108108
!8 = !{i32 1, !"wchar_size", i32 4}
109-
!27 = distinct !DISubprogram(name: "helper_kernel", scope: !5, file: !5, line: 18, type: !28, scopeLine: 18, flags: DIFlagArtificial | DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !31)
110-
!28 = !DISubroutineType(cc: DW_CC_LLVM_OpenCLKernel, types: !29)
111-
!29 = !{null, !30}
112-
!30 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !6, size: 64, dwarfAddressSpace: 1)
109+
!27 = distinct !DISubprogram(name: "helper_kernel", scope: !5, file: !5, line: 18, scopeLine: 18, flags: DIFlagArtificial | DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !31)
113110
!31 = !{}
114-
!33 = !{i32 0, i32 0}
115-
!34 = distinct !DISubprogram(name: "local_array", scope: !5, file: !5, line: 29, type: !35, scopeLine: 29, flags: DIFlagArtificial | DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !31)
116-
!35 = !DISubroutineType(cc: DW_CC_LLVM_OpenCLKernel, types: !36)
117-
!36 = !{null, !30, !30}
118-
!37 = !{i32 0, i32 0}
111+
!34 = distinct !DISubprogram(name: "local_array", scope: !5, file: !5, line: 29, scopeLine: 29, flags: DIFlagArtificial | DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !31)
119112

120113
!38 = !DIGlobalVariableExpression(var: !39, expr: !DIExpression(DW_OP_constu, 3, DW_OP_swap, DW_OP_xderef))
121114
!39 = distinct !DIGlobalVariable(name: "data", scope: !40, file: !5, line: 19, type: !47, isLocal: true, isDefinition: true)
122-
!40 = distinct !DISubprogram(name: "helper_kernel", scope: !41, file: !5, line: 18, type: !42, scopeLine: 18, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !46)
115+
!40 = distinct !DISubprogram(name: "helper_kernel", scope: !41, file: !5, line: 18, scopeLine: 18, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !46)
123116
!41 = !DIFile(filename: "kernel.opencl", directory: "/ComputeAorta")
124-
!42 = !DISubroutineType(cc: DW_CC_LLVM_OpenCLKernel, types: !43)
125-
!43 = !{null, !44}
126-
!44 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !45, size: 64, dwarfAddressSpace: 1)
127117
!45 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
128118
!46 = !{}
129119
!47 = !DICompositeType(tag: DW_TAG_array_type, baseType: !45, size: 128, elements: !48)

modules/compiler/test/lit/passes/replace-local-module-scope-vars-dbg.ll

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ attributes #0 = { "mux-kernel"="entry-point" }
3838
!2 = !{!3}
3939
!3 = !DIGlobalVariableExpression(var: !4, expr: !DIExpression(DW_OP_constu, 3, DW_OP_swap, DW_OP_xderef))
4040
!4 = distinct !DIGlobalVariable(name: "a", scope: !5, file: !1, line: 11, type: !7, isLocal: true, isDefinition: true)
41-
!5 = distinct !DISubprogram(name: "func", scope: !1, file: !1, type: !6, flags: DIFlagPrototyped, unit: !0)
42-
!6 = !DISubroutineType(cc: DW_CC_LLVM_OpenCLKernel, types: null)
41+
!5 = distinct !DISubprogram(name: "func", scope: !1, file: !1, flags: DIFlagPrototyped, unit: !0)
4342
!7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
4443
!8 = !{i32 1, !"Debug Info Version", i32 3}

modules/compiler/test/lit/passes/replace-target-tys-dbg.ll

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,8 @@ attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memo
4848
!2 = !{i32 2, !"Debug Info Version", i32 3}
4949
!3 = !{i32 1, !"wchar_size", i32 4}
5050
!4 = !{i32 1, i32 2}
51-
!5 = distinct !DISubprogram(name: "test_kernel", scope: !6, file: !6, line: 34, type: !7, scopeLine: 34, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !11)
51+
!5 = distinct !DISubprogram(name: "test_kernel", scope: !6, file: !6, line: 34, scopeLine: 34, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !11)
5252
!6 = !DIFile(filename: "kernel.opencl", directory: "/tmp")
53-
!7 = !DISubroutineType(cc: DW_CC_LLVM_OpenCLKernel, types: !8)
54-
!8 = !{null, !9, !9}
5553
!9 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !10, size: 64, dwarfAddressSpace: 1)
5654
!10 = !DIBasicType(name: "float", size: 32, encoding: DW_ATE_float)
5755
!11 = !{!12, !13}

0 commit comments

Comments
 (0)