mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 07:01:04 +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
+2
-2
@@ -19,7 +19,7 @@ fn G() -> i32 {
|
||||
// CHECK:STDOUT: ; ModuleID = 'function_param.carbon'
|
||||
// CHECK:STDOUT: source_filename = "function_param.carbon"
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: @array.loc16_11.1 = internal constant [3 x i32] [i32 1, i32 2, i32 3]
|
||||
// CHECK:STDOUT: @array.loc16_20.13 = internal constant [3 x i32] [i32 1, i32 2, i32 3]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: define i32 @_CF.Main(ptr %arr, i32 %i) !dbg !4 {
|
||||
// CHECK:STDOUT: entry:
|
||||
@@ -34,7 +34,7 @@ fn G() -> i32 {
|
||||
// CHECK:STDOUT: %.loc16_20.4.array.index = getelementptr inbounds [3 x i32], ptr %.loc16_20.2.temp, i32 0, i32 0, !dbg !10
|
||||
// CHECK:STDOUT: %.loc16_20.7.array.index = getelementptr inbounds [3 x i32], ptr %.loc16_20.2.temp, i32 0, i32 1, !dbg !10
|
||||
// CHECK:STDOUT: %.loc16_20.10.array.index = getelementptr inbounds [3 x i32], ptr %.loc16_20.2.temp, i32 0, i32 2, !dbg !10
|
||||
// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %.loc16_20.2.temp, ptr align 4 @array.loc16_11.1, i64 12, i1 false), !dbg !11
|
||||
// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %.loc16_20.2.temp, ptr align 4 @array.loc16_20.13, i64 12, i1 false), !dbg !10
|
||||
// CHECK:STDOUT: %F.call = call i32 @_CF.Main(ptr %.loc16_20.2.temp, i32 1), !dbg !11
|
||||
// CHECK:STDOUT: ret i32 %F.call, !dbg !12
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
Reference in New Issue
Block a user