mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 06:34:41 +01:00
Generate parameter pattern-match IR from pattern IR (#4388)
Also propagate the pattern IR along with the pattern-match IR, and use it where appropriate. Strictly speaking, some parts of the pattern-match IR are allocated eagerly, while traversing the pattern's parse tree, but they still aren't actually emitted until we traverse the associated pattern insts. --------- Co-authored-by: Jon Ross-Perkins <jperkins@google.com>
This commit is contained in:
co-authored by
Jon Ross-Perkins
parent
4a73b36688
commit
9d942f4633
@@ -17,7 +17,7 @@ fn Main() {
|
||||
// CHECK:STDOUT: ; ModuleID = 'struct_param.carbon'
|
||||
// CHECK:STDOUT: source_filename = "struct_param.carbon"
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: @struct.3.loc14_4.3 = internal constant { i32, i32 } { i32 2, i32 3 }
|
||||
// CHECK:STDOUT: @struct.3.loc14_34.2 = internal constant { i32, i32 } { i32 2, i32 3 }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: define void @_CF.Main({ i32 } %b, ptr %c) !dbg !4 {
|
||||
// CHECK:STDOUT: entry:
|
||||
@@ -26,7 +26,7 @@ fn Main() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: define void @_CMain.Main() !dbg !8 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: call void @_CF.Main({ i32 } { i32 1 }, ptr @struct.3.loc14_4.3), !dbg !9
|
||||
// CHECK:STDOUT: call void @_CF.Main({ i32 } { i32 1 }, ptr @struct.3.loc14_34.2), !dbg !9
|
||||
// CHECK:STDOUT: ret void, !dbg !10
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -17,7 +17,7 @@ fn Main() {
|
||||
// CHECK:STDOUT: ; ModuleID = 'tuple_param.carbon'
|
||||
// CHECK:STDOUT: source_filename = "tuple_param.carbon"
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: @tuple.3.loc14_4.3 = internal constant { i32, i32 } { i32 2, i32 3 }
|
||||
// CHECK:STDOUT: @tuple.3.loc14_20.2 = internal constant { i32, i32 } { i32 2, i32 3 }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: define void @_CF.Main({ i32 } %b, ptr %c) !dbg !4 {
|
||||
// CHECK:STDOUT: entry:
|
||||
@@ -26,7 +26,7 @@ fn Main() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: define void @_CMain.Main() !dbg !8 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: call void @_CF.Main({ i32 } { i32 1 }, ptr @tuple.3.loc14_4.3), !dbg !9
|
||||
// CHECK:STDOUT: call void @_CF.Main({ i32 } { i32 1 }, ptr @tuple.3.loc14_20.2), !dbg !9
|
||||
// CHECK:STDOUT: ret void, !dbg !10
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -19,7 +19,7 @@ fn Main() {
|
||||
// CHECK:STDOUT: ; ModuleID = 'tuple_param_with_return_slot.carbon'
|
||||
// CHECK:STDOUT: source_filename = "tuple_param_with_return_slot.carbon"
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: @tuple.3.loc16_4.4 = internal constant { i32, i32 } { i32 2, i32 3 }
|
||||
// CHECK:STDOUT: @tuple.3.loc16_20.2 = internal constant { i32, i32 } { i32 2, i32 3 }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: define void @_CF.Main(ptr sret({ i32, i32, i32 }) %return, { i32 } %b, ptr %c) !dbg !4 {
|
||||
// CHECK:STDOUT: entry:
|
||||
@@ -40,7 +40,7 @@ fn Main() {
|
||||
// CHECK:STDOUT: define void @_CMain.Main() !dbg !12 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %.loc16_4.1.temp = alloca { i32, i32, i32 }, align 8, !dbg !13
|
||||
// CHECK:STDOUT: call void @_CF.Main(ptr %.loc16_4.1.temp, { i32 } { i32 1 }, ptr @tuple.3.loc16_4.4), !dbg !13
|
||||
// CHECK:STDOUT: call void @_CF.Main(ptr %.loc16_4.1.temp, { i32 } { i32 1 }, ptr @tuple.3.loc16_20.2), !dbg !13
|
||||
// CHECK:STDOUT: ret void, !dbg !14
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
Reference in New Issue
Block a user