Update to a more recent LLVM. (#7488)

Fix a few API issues. There's also a newly-added file in compiler-rt
that is not supposed to be built by default but is not being excluded
properly by a glob. Added a patch to exclude that and sent
https://github.com/llvm/llvm-project/pull/208861 upstream.
This commit is contained in:
Richard Smith
2026-07-13 22:29:39 +00:00
committed by GitHub
parent 8ea32187d4
commit 8bae79f44a
46 changed files with 5222 additions and 5072 deletions
+39 -38
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 !11
// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !11, !nonnull !14, !align !15
// 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: 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 !16
// 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 = 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 !18 {
// CHECK:STDOUT: define i32 @_CF.Main(ptr %a) #3 !dbg !19 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %.loc5_43.2.array.index = getelementptr inbounds [5 x i32], ptr %a, i32 0, i32 2, !dbg !25
// CHECK:STDOUT: %.loc5_43.3 = load i32, ptr %.loc5_43.2.array.index, align 4, !dbg !25
// CHECK:STDOUT: ret i32 %.loc5_43.3, !dbg !26
// 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: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define void @_CF__carbon_thunk.Main(ptr %_, ptr %_1) #3 !dbg !27 {
// CHECK:STDOUT: define void @_CF__carbon_thunk.Main(ptr %_, ptr %_1) #3 !dbg !28 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %F.call = call i32 @_CF.Main(ptr %_), !dbg !33
// CHECK:STDOUT: store i32 %F.call, ptr %_1, align 4, !dbg !33
// CHECK:STDOUT: ret void, !dbg !33
// 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: }
// 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" }
@@ -110,31 +110,32 @@ int H() {
// 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, !8, i64 0}
// CHECK:STDOUT: !8 = !{!"int", !9, i64 0}
// CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0}
// CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"}
// CHECK:STDOUT: !11 = !{!12, !12, i64 0}
// CHECK:STDOUT: !12 = !{!"p1 int", !13, i64 0}
// CHECK:STDOUT: !13 = !{!"any pointer", !9, i64 0}
// CHECK:STDOUT: !14 = !{}
// CHECK:STDOUT: !15 = !{i64 4}
// CHECK:STDOUT: !16 = !{i64 0, i64 20, !17}
// CHECK:STDOUT: !17 = !{!9, !9, i64 0}
// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 5, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !23)
// CHECK:STDOUT: !19 = !DISubroutineType(types: !20)
// CHECK:STDOUT: !20 = !{!21, !22}
// CHECK:STDOUT: !21 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
// CHECK:STDOUT: !22 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64)
// CHECK:STDOUT: !23 = !{!24}
// CHECK:STDOUT: !24 = !DILocalVariable(arg: 1, scope: !18, type: !22)
// CHECK:STDOUT: !25 = !DILocation(line: 5, column: 40, scope: !18)
// CHECK:STDOUT: !26 = !DILocation(line: 5, column: 33, scope: !18)
// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "F__carbon_thunk", linkageName: "_CF__carbon_thunk.Main", scope: null, file: !1, line: 5, type: !28, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !30)
// CHECK:STDOUT: !28 = !DISubroutineType(types: !29)
// CHECK:STDOUT: !29 = !{null, !22, !21}
// CHECK:STDOUT: !30 = !{!31, !32}
// CHECK:STDOUT: !31 = !DILocalVariable(arg: 1, scope: !27, type: !22)
// CHECK:STDOUT: !32 = !DILocalVariable(arg: 2, scope: !27, type: !21)
// CHECK:STDOUT: !33 = !DILocation(line: 5, column: 1, scope: !27)
// 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: