roll llvm to 7024b9e1b423b3c3c6ac76ab6a73cb2c9e4ef842 (#7781)

Updated patch 0006 to include new files added in
https://github.com/llvm/llvm-project/pull/207543.

Dropped patch 0009 which was upstreamed in:
https://github.com/llvm/llvm-project/pull/190088

Minor updates to patch 0011 for changes upstream.

Minor updates in export.cpp to use `llvm::FoldingSetInsertToken` instead
of a void pointer.
This commit is contained in:
Nicholas Bishop
2026-09-14 21:54:09 +00:00
committed by GitHub
parent 4081848d65
commit cf66fb8aeb
257 changed files with 22634 additions and 23205 deletions
+49 -49
View File
@@ -54,8 +54,8 @@ int H() {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %retval = alloca i32, align 4
// CHECK:STDOUT: %.addr = alloca ptr, align 8
// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !12
// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !12, !nonnull !15, !align !16
// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !46
// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !46, !nonnull !47, !align !48
// CHECK:STDOUT: call void @_CF__carbon_thunk.Main(ptr noundef nonnull align 4 dereferenceable(20) %1, ptr noundef nonnull align 4 dereferenceable(4) %retval)
// CHECK:STDOUT: %2 = load i32, ptr %retval, align 4
// CHECK:STDOUT: ret i32 %2
@@ -69,7 +69,7 @@ int H() {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %ref.tmp = alloca [5 x i32], align 4
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ref.tmp) #3
// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %ref.tmp, ptr align 4 @constinit, i64 20, i1 false), !tbaa.struct !17
// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %ref.tmp, ptr align 4 @constinit, i64 20, i1 false), !tbaa.struct !3
// CHECK:STDOUT: %call = call noundef i32 @_ZN6CarbonL1FERA5_Ki(ptr noundef nonnull align 4 dereferenceable(20) %ref.tmp)
// CHECK:STDOUT: call void @llvm.lifetime.end.p0(ptr %ref.tmp) #3
// CHECK:STDOUT: ret i32 %call
@@ -79,19 +79,19 @@ int H() {
// CHECK:STDOUT: declare void @llvm.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr noalias readonly captures(none), i64, i1 immarg) #1
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define i32 @_CF.Main(ptr %a) #3 !dbg !19 {
// CHECK:STDOUT: define i32 @_CF.Main(ptr %a) #3 !dbg !30 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %.loc5_43.2.array.index = getelementptr inbounds [5 x i32], ptr %a, i32 0, i32 2, !dbg !26
// CHECK:STDOUT: %.loc5_43.3 = load i32, ptr %.loc5_43.2.array.index, align 4, !dbg !26
// CHECK:STDOUT: ret i32 %.loc5_43.3, !dbg !27
// CHECK:STDOUT: %.loc5_43.2.array.index = getelementptr inbounds [5 x i32], ptr %a, i32 0, i32 2, !dbg !35
// CHECK:STDOUT: %.loc5_43.3 = load i32, ptr %.loc5_43.2.array.index, align 4, !dbg !35
// CHECK:STDOUT: ret i32 %.loc5_43.3, !dbg !36
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define void @_CF__carbon_thunk.Main(ptr %_, ptr %_1) #3 !dbg !28 {
// CHECK:STDOUT: define void @_CF__carbon_thunk.Main(ptr %_, ptr %_1) #3 !dbg !38 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %F.call = call i32 @_CF.Main(ptr %_), !dbg !34
// CHECK:STDOUT: store i32 %F.call, ptr %_1, align 4, !dbg !34
// CHECK:STDOUT: ret void, !dbg !34
// CHECK:STDOUT: %F.call = call i32 @_CF.Main(ptr %_), !dbg !41
// CHECK:STDOUT: store i32 %F.call, ptr %_1, align 4, !dbg !41
// CHECK:STDOUT: ret void, !dbg !41
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
@@ -99,43 +99,43 @@ int H() {
// CHECK:STDOUT: attributes #2 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
// CHECK:STDOUT: attributes #3 = { nounwind }
// CHECK:STDOUT:
// CHECK:STDOUT: !llvm.dbg.cu = !{!0}
// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6}
// CHECK:STDOUT: !llvm.errno.tbaa = !{!7}
// CHECK:STDOUT: !llvm.dbg.cu = !{!23}
// CHECK:STDOUT: !llvm.module.flags = !{!49, !50, !51, !6, !7}
// CHECK:STDOUT: !llvm.errno.tbaa = !{!53}
// CHECK:STDOUT:
// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
// CHECK:STDOUT: !1 = !DIFile(filename: "array_value_param.carbon", directory: "")
// CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2}
// CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2}
// CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2}
// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5}
// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3}
// CHECK:STDOUT: !7 = !{!8, !9, i64 0}
// CHECK:STDOUT: !8 = !{!"__libc_errno", !9, i64 0}
// CHECK:STDOUT: !9 = !{!"int", !10, i64 0}
// CHECK:STDOUT: !10 = !{!"omnipotent char", !11, i64 0}
// CHECK:STDOUT: !11 = !{!"Simple C++ TBAA"}
// CHECK:STDOUT: !12 = !{!13, !13, i64 0}
// CHECK:STDOUT: !13 = !{!"p1 int", !14, i64 0}
// CHECK:STDOUT: !14 = !{!"any pointer", !10, i64 0}
// CHECK:STDOUT: !15 = !{}
// CHECK:STDOUT: !16 = !{i64 4}
// CHECK:STDOUT: !17 = !{i64 0, i64 20, !18}
// CHECK:STDOUT: !18 = !{!10, !10, i64 0}
// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 5, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !24)
// CHECK:STDOUT: !20 = !DISubroutineType(types: !21)
// CHECK:STDOUT: !21 = !{!22, !23}
// CHECK:STDOUT: !22 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
// CHECK:STDOUT: !23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64)
// CHECK:STDOUT: !24 = !{!25}
// CHECK:STDOUT: !25 = !DILocalVariable(arg: 1, scope: !19, type: !23)
// CHECK:STDOUT: !26 = !DILocation(line: 5, column: 40, scope: !19)
// CHECK:STDOUT: !27 = !DILocation(line: 5, column: 33, scope: !19)
// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "F__carbon_thunk", linkageName: "_CF__carbon_thunk.Main", scope: null, file: !1, line: 5, type: !29, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !31)
// CHECK:STDOUT: !29 = !DISubroutineType(types: !30)
// CHECK:STDOUT: !30 = !{null, !23, !22}
// CHECK:STDOUT: !31 = !{!32, !33}
// CHECK:STDOUT: !32 = !DILocalVariable(arg: 1, scope: !28, type: !23)
// CHECK:STDOUT: !33 = !DILocalVariable(arg: 2, scope: !28, type: !22)
// CHECK:STDOUT: !34 = !DILocation(line: 5, column: 1, scope: !28)
// CHECK:STDOUT: !0 = !{!"Simple C++ TBAA"}
// CHECK:STDOUT: !1 = !{!"omnipotent char", !0, i64 0}
// CHECK:STDOUT: !2 = !{!1, !1, i64 0}
// CHECK:STDOUT: !3 = !{i64 0, i64 20, !2}
// CHECK:STDOUT: !6 = !{i32 7, !"Dwarf Version", i32 5}
// CHECK:STDOUT: !7 = !{i32 2, !"Debug Info Version", i32 3}
// CHECK:STDOUT: !22 = !DIFile(filename: "array_value_param.carbon", directory: "")
// CHECK:STDOUT: !23 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !22, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
// CHECK:STDOUT: !24 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
// CHECK:STDOUT: !25 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64)
// CHECK:STDOUT: !26 = !{!24, !25}
// CHECK:STDOUT: !27 = !DISubroutineType(types: !26)
// CHECK:STDOUT: !28 = !{null, !25, !24}
// CHECK:STDOUT: !29 = !DISubroutineType(types: !28)
// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !22, line: 5, type: !27, spFlags: DISPFlagDefinition, unit: !23, retainedNodes: !37)
// CHECK:STDOUT: !31 = !DILocalVariable(arg: 1, scope: !30, type: !25)
// CHECK:STDOUT: !35 = !DILocation(line: 5, column: 40, scope: !30)
// CHECK:STDOUT: !36 = !DILocation(line: 5, column: 33, scope: !30)
// CHECK:STDOUT: !37 = !{!31}
// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "F__carbon_thunk", linkageName: "_CF__carbon_thunk.Main", scope: null, file: !22, line: 5, type: !29, spFlags: DISPFlagDefinition, unit: !23, retainedNodes: !42)
// CHECK:STDOUT: !39 = !DILocalVariable(arg: 1, scope: !38, type: !25)
// CHECK:STDOUT: !40 = !DILocalVariable(arg: 2, scope: !38, type: !24)
// CHECK:STDOUT: !41 = !DILocation(line: 5, column: 1, scope: !38)
// CHECK:STDOUT: !42 = !{!39, !40}
// CHECK:STDOUT: !43 = !{!"int", !1, i64 0}
// CHECK:STDOUT: !44 = !{!"any pointer", !1, i64 0}
// CHECK:STDOUT: !45 = !{!"p1 int", !44, i64 0}
// CHECK:STDOUT: !46 = !{!45, !45, i64 0}
// CHECK:STDOUT: !47 = !{}
// CHECK:STDOUT: !48 = !{i64 4}
// CHECK:STDOUT: !49 = !{i32 8, !"PIC Level", i32 2}
// CHECK:STDOUT: !50 = !{i32 7, !"PIE Level", i32 2}
// CHECK:STDOUT: !51 = !{i32 7, !"uwtable", i32 2}
// CHECK:STDOUT: !52 = !{!"__libc_errno", !43, i64 0}
// CHECK:STDOUT: !53 = !{!52, !43, i64 0}
// CHECK:STDOUT: