mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 21:10:12 +01:00
Prototype for coalescing equivalent specifics of the same generic. (#5314)
This is a working version for coalescing equivalent specifics of the same generic, with *many* things to add and improve.
This commit is contained in:
@@ -59,7 +59,7 @@ fn M() {
|
||||
// CHECK:STDOUT: %.loc30_5 = load ptr, ptr %ptr_i32.var, align 8, !dbg !15
|
||||
// CHECK:STDOUT: %F.call.loc30 = call ptr @_CF.Main.e8193710fd35b608(ptr %.loc30_5, i32 0), !dbg !16
|
||||
// CHECK:STDOUT: %.loc31_5 = load ptr, ptr %ptr_f64.var, align 8, !dbg !17
|
||||
// CHECK:STDOUT: %F.call.loc31 = call ptr @_CF.Main.04bf2edaaa84aa22(ptr %.loc31_5, i32 0), !dbg !18
|
||||
// CHECK:STDOUT: %F.call.loc31 = call ptr @_CF.Main.e8193710fd35b608(ptr %.loc31_5, i32 0), !dbg !18
|
||||
// CHECK:STDOUT: ret void, !dbg !19
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -108,22 +108,9 @@ fn M() {
|
||||
// CHECK:STDOUT: ret ptr %F.call, !dbg !40
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: define linkonce_odr ptr @_CF.Main.04bf2edaaa84aa22(ptr %x, i32 %count) !dbg !41 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %int.greater = icmp sgt i32 %count, 0, !dbg !42
|
||||
// CHECK:STDOUT: br i1 %int.greater, label %if.then, label %if.else, !dbg !43
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: if.then: ; preds = %entry
|
||||
// CHECK:STDOUT: ret ptr %x, !dbg !44
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: if.else: ; preds = %entry
|
||||
// CHECK:STDOUT: %int.sadd = add i32 %count, 1, !dbg !45
|
||||
// CHECK:STDOUT: %F.call = call ptr @_CF.Main.04bf2edaaa84aa22(ptr %x, i32 %int.sadd), !dbg !46
|
||||
// CHECK:STDOUT: ret ptr %F.call, !dbg !47
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; uselistorder directives
|
||||
// CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 3, 2, 1, 0 }
|
||||
// CHECK:STDOUT: uselistorder ptr @_CF.Main.e8193710fd35b608, { 1, 2, 0 }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
|
||||
// CHECK:STDOUT:
|
||||
@@ -171,10 +158,3 @@ fn M() {
|
||||
// CHECK:STDOUT: !38 = !DILocation(line: 19, column: 15, scope: !34)
|
||||
// CHECK:STDOUT: !39 = !DILocation(line: 19, column: 10, scope: !34)
|
||||
// CHECK:STDOUT: !40 = !DILocation(line: 19, column: 3, scope: !34)
|
||||
// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.04bf2edaaa84aa22", scope: null, file: !3, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !2)
|
||||
// CHECK:STDOUT: !42 = !DILocation(line: 16, column: 7, scope: !41)
|
||||
// CHECK:STDOUT: !43 = !DILocation(line: 16, column: 6, scope: !41)
|
||||
// CHECK:STDOUT: !44 = !DILocation(line: 17, column: 5, scope: !41)
|
||||
// CHECK:STDOUT: !45 = !DILocation(line: 19, column: 15, scope: !41)
|
||||
// CHECK:STDOUT: !46 = !DILocation(line: 19, column: 10, scope: !41)
|
||||
// CHECK:STDOUT: !47 = !DILocation(line: 19, column: 3, scope: !41)
|
||||
|
||||
Reference in New Issue
Block a user