Remove return_slot_id (#4577)

Co-authored-by: Richard Smith <richard@metafoo.co.uk>
This commit is contained in:
Geoff Romer
2024-12-04 00:21:24 +00:00
committed by GitHub
co-authored by Richard Smith
parent 33110d096c
commit 78d7a7c291
109 changed files with 1160 additions and 1185 deletions
@@ -93,7 +93,7 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd";
// CHECK:STDOUT: %m.param.loc11: %i32 = value_param runtime_param1
// CHECK:STDOUT: %m.loc11: %i32 = bind_name m, %m.param.loc11
// CHECK:STDOUT: %return.param.loc11: ref %i32 = out_param runtime_param2
// CHECK:STDOUT: %.loc11_22: ref %i32 = return_slot %return.param.loc11
// CHECK:STDOUT: %return.loc11: ref %i32 = return_slot %return.param.loc11
// CHECK:STDOUT: }
// CHECK:STDOUT: %A.decl.loc19: %A.type = fn_decl @A [template = constants.%A] {
// CHECK:STDOUT: %n.patt: %i32 = binding_pattern n
@@ -120,7 +120,7 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd";
// CHECK:STDOUT: %m.param.loc19: %i32 = value_param runtime_param1
// CHECK:STDOUT: %m.loc19: %i32 = bind_name m, %m.param.loc19
// CHECK:STDOUT: %return.param.loc19: ref %i32 = out_param runtime_param2
// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param.loc19
// CHECK:STDOUT: %return.loc19: ref %i32 = return_slot %return.param.loc19
// CHECK:STDOUT: }
// CHECK:STDOUT: %B.decl.loc21: %B.type = fn_decl @B [template = constants.%B] {
// CHECK:STDOUT: %n.patt: %i32 = binding_pattern n
@@ -147,7 +147,7 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd";
// CHECK:STDOUT: %m.param.loc21: %i32 = value_param runtime_param1
// CHECK:STDOUT: %m.loc21: %i32 = bind_name m, %m.param.loc21
// CHECK:STDOUT: %return.param.loc21: ref %i32 = out_param runtime_param2
// CHECK:STDOUT: %.loc21_22: ref %i32 = return_slot %return.param.loc21
// CHECK:STDOUT: %return.loc21: ref %i32 = return_slot %return.param.loc21
// CHECK:STDOUT: }
// CHECK:STDOUT: %B.decl.loc29: %B.type = fn_decl @B [template = constants.%B] {
// CHECK:STDOUT: %n.patt: %i32 = binding_pattern n
@@ -174,7 +174,7 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd";
// CHECK:STDOUT: %m.param.loc29: %i32 = value_param runtime_param1
// CHECK:STDOUT: %m.loc29: %i32 = bind_name m, %m.param.loc29
// CHECK:STDOUT: %return.param.loc29: ref %i32 = out_param runtime_param2
// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param.loc29
// CHECK:STDOUT: %return.loc29: ref %i32 = return_slot %return.param.loc29
// CHECK:STDOUT: }
// CHECK:STDOUT: %C.decl.loc31: %C.type = fn_decl @C [template = constants.%C] {
// CHECK:STDOUT: %n.patt: %i32 = binding_pattern n
@@ -201,7 +201,7 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd";
// CHECK:STDOUT: %m.param.loc31: %i32 = value_param runtime_param1
// CHECK:STDOUT: %m.loc31: %i32 = bind_name m, %m.param.loc31
// CHECK:STDOUT: %return.param.loc31: ref %i32 = out_param runtime_param2
// CHECK:STDOUT: %.loc31_22: ref %i32 = return_slot %return.param.loc31
// CHECK:STDOUT: %return.loc31: ref %i32 = return_slot %return.param.loc31
// CHECK:STDOUT: }
// CHECK:STDOUT: %C.decl.loc38: %C.type = fn_decl @C [template = constants.%C] {
// CHECK:STDOUT: %n.patt: %i32 = binding_pattern n
@@ -228,7 +228,7 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd";
// CHECK:STDOUT: %m.param.loc38: %i32 = value_param runtime_param1
// CHECK:STDOUT: %m.loc38: %i32 = bind_name m, %m.param.loc38
// CHECK:STDOUT: %return.param.loc38: ref %i32 = out_param runtime_param2
// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param.loc38
// CHECK:STDOUT: %return.loc38: ref %i32 = return_slot %return.param.loc38
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -87,7 +87,7 @@ fn Class(F:! type).Inner.G() -> i32 { return F(); }
// CHECK:STDOUT: %.loc13_33.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32]
// CHECK:STDOUT: %.loc13_33.2: type = converted %int.make_type_signed.loc13, %.loc13_33.1 [template = constants.%i32]
// CHECK:STDOUT: %return.param.loc13: ref %i32 = out_param runtime_param0
// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param.loc13
// CHECK:STDOUT: %return.loc13: ref %i32 = return_slot %return.param.loc13
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -137,7 +137,7 @@ fn Class(F:! type).Inner.G() -> i32 { return F(); }
// CHECK:STDOUT: %.loc9_15.1: type = value_of_initializer %int.make_type_signed.loc9 [template = constants.%i32]
// CHECK:STDOUT: %.loc9_15.2: type = converted %int.make_type_signed.loc9, %.loc9_15.1 [template = constants.%i32]
// CHECK:STDOUT: %return.param.loc9: ref %i32 = out_param runtime_param0
// CHECK:STDOUT: %.loc9_12: ref %i32 = return_slot %return.param.loc9
// CHECK:STDOUT: %return.loc9: ref %i32 = return_slot %return.param.loc9
// CHECK:STDOUT: }
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template = constants.%complete_type]
// CHECK:STDOUT:
+29 -29
View File
@@ -487,14 +487,14 @@ import library "extern_api";
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %import_ref.1: %A.type = import_ref Main//api, inst+3, loaded [template = constants.%A]
// CHECK:STDOUT: %import_ref.2: %B.type = import_ref Main//api, inst+34, loaded [template = constants.%B]
// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Main//api, inst+59, loaded [template = constants.%C]
// CHECK:STDOUT: %import_ref.4: %D.type = import_ref Main//api, inst+62, loaded [template = constants.%D]
// CHECK:STDOUT: %import_ref.5: <namespace> = import_ref Main//api, inst+65, loaded
// CHECK:STDOUT: %import_ref.2: %B.type = import_ref Main//api, inst+33, loaded [template = constants.%B]
// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Main//api, inst+58, loaded [template = constants.%C]
// CHECK:STDOUT: %import_ref.4: %D.type = import_ref Main//api, inst+61, loaded [template = constants.%D]
// CHECK:STDOUT: %import_ref.5: <namespace> = import_ref Main//api, inst+64, loaded
// CHECK:STDOUT: %NS: <namespace> = namespace %import_ref.5, [template] {
// CHECK:STDOUT: .E = %import_ref.6
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref.6: %E.type = import_ref Main//api, inst+66, loaded [template = constants.%E]
// CHECK:STDOUT: %import_ref.6: %E.type = import_ref Main//api, inst+65, loaded [template = constants.%E]
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
// CHECK:STDOUT: .Int = %import_ref.7
// CHECK:STDOUT: .ImplicitAs = %import_ref.8
@@ -628,7 +628,7 @@ import library "extern_api";
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %import_ref.5: <namespace> = import_ref Main//api, inst+65, loaded
// CHECK:STDOUT: %import_ref.5: <namespace> = import_ref Main//api, inst+64, loaded
// CHECK:STDOUT: %NS: <namespace> = namespace %import_ref.5, [template] {
// CHECK:STDOUT: .E = file.%E.decl
// CHECK:STDOUT: }
@@ -669,7 +669,7 @@ import library "extern_api";
// CHECK:STDOUT: %b.param: %i32 = value_param runtime_param0
// CHECK:STDOUT: %b: %i32 = bind_name b, %b.param
// CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1
// CHECK:STDOUT: %.loc23_21: ref %i32 = return_slot %return.param
// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] {} {
// CHECK:STDOUT: %int_32.loc32_17: Core.IntLiteral = int_value 32 [template = constants.%int_32]
@@ -686,7 +686,7 @@ import library "extern_api";
// CHECK:STDOUT: %c.param: %tuple.type.2 = value_param runtime_param0
// CHECK:STDOUT: %c: %tuple.type.2 = bind_name c, %c.param
// CHECK:STDOUT: %return.param: ref %struct_type.c = out_param runtime_param1
// CHECK:STDOUT: %.loc32_24: ref %struct_type.c = return_slot %return.param
// CHECK:STDOUT: %return: ref %struct_type.c = return_slot %return.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %D.decl: %D.type = fn_decl @D [template = constants.%D] {} {}
// CHECK:STDOUT: %E.decl: %E.type = fn_decl @E [template = constants.%E] {} {}
@@ -799,7 +799,7 @@ import library "extern_api";
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %import_ref.5: <namespace> = import_ref Main//extern_api, inst+65, loaded
// CHECK:STDOUT: %import_ref.5: <namespace> = import_ref Main//extern_api, inst+64, loaded
// CHECK:STDOUT: %NS: <namespace> = namespace %import_ref.5, [template] {
// CHECK:STDOUT: .E = file.%E.decl
// CHECK:STDOUT: }
@@ -840,7 +840,7 @@ import library "extern_api";
// CHECK:STDOUT: %b.param: %i32 = value_param runtime_param0
// CHECK:STDOUT: %b: %i32 = bind_name b, %b.param
// CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1
// CHECK:STDOUT: %.loc7_21: ref %i32 = return_slot %return.param
// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] {} {
// CHECK:STDOUT: %int_32.loc8_17: Core.IntLiteral = int_value 32 [template = constants.%int_32]
@@ -857,7 +857,7 @@ import library "extern_api";
// CHECK:STDOUT: %c.param: %tuple.type.2 = value_param runtime_param0
// CHECK:STDOUT: %c: %tuple.type.2 = bind_name c, %c.param
// CHECK:STDOUT: %return.param: ref %struct_type.c = out_param runtime_param1
// CHECK:STDOUT: %.loc8_24: ref %struct_type.c = return_slot %return.param
// CHECK:STDOUT: %return: ref %struct_type.c = return_slot %return.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %D.decl: %D.type = fn_decl @D [template = constants.%D] {} {}
// CHECK:STDOUT: %E.decl: %E.type = fn_decl @E [template = constants.%E] {} {}
@@ -970,14 +970,14 @@ import library "extern_api";
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %import_ref.1: %A.type = import_ref Main//api, inst+3, loaded [template = constants.%A]
// CHECK:STDOUT: %import_ref.2: %B.type = import_ref Main//api, inst+34, loaded [template = constants.%B]
// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Main//api, inst+59, loaded [template = constants.%C]
// CHECK:STDOUT: %import_ref.4: %D.type = import_ref Main//api, inst+62, loaded [template = constants.%D]
// CHECK:STDOUT: %import_ref.5: <namespace> = import_ref Main//api, inst+65, loaded
// CHECK:STDOUT: %import_ref.2: %B.type = import_ref Main//api, inst+33, loaded [template = constants.%B]
// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Main//api, inst+58, loaded [template = constants.%C]
// CHECK:STDOUT: %import_ref.4: %D.type = import_ref Main//api, inst+61, loaded [template = constants.%D]
// CHECK:STDOUT: %import_ref.5: <namespace> = import_ref Main//api, inst+64, loaded
// CHECK:STDOUT: %NS: <namespace> = namespace %import_ref.5, [template] {
// CHECK:STDOUT: .E = %import_ref.6
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref.6: %E.type = import_ref Main//api, inst+66, loaded [template = constants.%E]
// CHECK:STDOUT: %import_ref.6: %E.type = import_ref Main//api, inst+65, loaded [template = constants.%E]
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
// CHECK:STDOUT: .Int = %import_ref.12
// CHECK:STDOUT: .ImplicitAs = %import_ref.13
@@ -1111,14 +1111,14 @@ import library "extern_api";
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %import_ref.1: %A.type = import_ref Main//extern_api, inst+3, loaded [template = constants.%A]
// CHECK:STDOUT: %import_ref.2: %B.type = import_ref Main//extern_api, inst+34, loaded [template = constants.%B]
// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Main//extern_api, inst+59, loaded [template = constants.%C]
// CHECK:STDOUT: %import_ref.4: %D.type = import_ref Main//extern_api, inst+62, loaded [template = constants.%D]
// CHECK:STDOUT: %import_ref.5: <namespace> = import_ref Main//extern_api, inst+65, loaded
// CHECK:STDOUT: %import_ref.2: %B.type = import_ref Main//extern_api, inst+33, loaded [template = constants.%B]
// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Main//extern_api, inst+58, loaded [template = constants.%C]
// CHECK:STDOUT: %import_ref.4: %D.type = import_ref Main//extern_api, inst+61, loaded [template = constants.%D]
// CHECK:STDOUT: %import_ref.5: <namespace> = import_ref Main//extern_api, inst+64, loaded
// CHECK:STDOUT: %NS: <namespace> = namespace %import_ref.5, [template] {
// CHECK:STDOUT: .E = %import_ref.6
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref.6: %E.type = import_ref Main//extern_api, inst+66, loaded [template = constants.%E]
// CHECK:STDOUT: %import_ref.6: %E.type = import_ref Main//extern_api, inst+65, loaded [template = constants.%E]
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
// CHECK:STDOUT: .Int = %import_ref.12
// CHECK:STDOUT: .ImplicitAs = %import_ref.13
@@ -1222,10 +1222,10 @@ import library "extern_api";
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %import_ref.1 = import_ref Main//api, inst+3, unloaded
// CHECK:STDOUT: %import_ref.2 = import_ref Main//api, inst+34, unloaded
// CHECK:STDOUT: %import_ref.3 = import_ref Main//api, inst+59, unloaded
// CHECK:STDOUT: %import_ref.4 = import_ref Main//api, inst+62, unloaded
// CHECK:STDOUT: %import_ref.5: <namespace> = import_ref Main//api, inst+65, loaded
// CHECK:STDOUT: %import_ref.2 = import_ref Main//api, inst+33, unloaded
// CHECK:STDOUT: %import_ref.3 = import_ref Main//api, inst+58, unloaded
// CHECK:STDOUT: %import_ref.4 = import_ref Main//api, inst+61, unloaded
// CHECK:STDOUT: %import_ref.5: <namespace> = import_ref Main//api, inst+64, loaded
// CHECK:STDOUT: %NS: <namespace> = namespace %import_ref.5, [template] {
// CHECK:STDOUT: .E = %import_ref.6
// CHECK:STDOUT: }
@@ -1252,10 +1252,10 @@ import library "extern_api";
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %import_ref.1 = import_ref Main//extern_api, inst+3, unloaded
// CHECK:STDOUT: %import_ref.2 = import_ref Main//extern_api, inst+34, unloaded
// CHECK:STDOUT: %import_ref.3 = import_ref Main//extern_api, inst+59, unloaded
// CHECK:STDOUT: %import_ref.4 = import_ref Main//extern_api, inst+62, unloaded
// CHECK:STDOUT: %import_ref.5: <namespace> = import_ref Main//extern_api, inst+65, loaded
// CHECK:STDOUT: %import_ref.2 = import_ref Main//extern_api, inst+33, unloaded
// CHECK:STDOUT: %import_ref.3 = import_ref Main//extern_api, inst+58, unloaded
// CHECK:STDOUT: %import_ref.4 = import_ref Main//extern_api, inst+61, unloaded
// CHECK:STDOUT: %import_ref.5: <namespace> = import_ref Main//extern_api, inst+64, loaded
// CHECK:STDOUT: %NS: <namespace> = namespace %import_ref.5, [template] {
// CHECK:STDOUT: .E = %import_ref.6
// CHECK:STDOUT: }
+8 -8
View File
@@ -271,9 +271,9 @@ fn D() {}
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %import_ref.1: %A.type = import_ref Main//fns, inst+3, loaded [template = constants.%A]
// CHECK:STDOUT: %import_ref.2: %B.type = import_ref Main//fns, inst+35, loaded [template = constants.%B]
// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Main//fns, inst+62, loaded [template = constants.%C]
// CHECK:STDOUT: %import_ref.4 = import_ref Main//fns, inst+73, unloaded
// CHECK:STDOUT: %import_ref.2: %B.type = import_ref Main//fns, inst+34, loaded [template = constants.%B]
// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Main//fns, inst+61, loaded [template = constants.%C]
// CHECK:STDOUT: %import_ref.4 = import_ref Main//fns, inst+72, unloaded
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
// CHECK:STDOUT: .Int = %import_ref.5
// CHECK:STDOUT: .ImplicitAs = %import_ref.6
@@ -365,8 +365,8 @@ fn D() {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %import_ref.3 = import_ref Main//fns, inst+62, unloaded
// CHECK:STDOUT: %import_ref.4 = import_ref Main//fns, inst+73, unloaded
// CHECK:STDOUT: %import_ref.3 = import_ref Main//fns, inst+61, unloaded
// CHECK:STDOUT: %import_ref.4 = import_ref Main//fns, inst+72, unloaded
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
// CHECK:STDOUT: .Int = %import_ref.5
// CHECK:STDOUT: import Core//prelude
@@ -397,7 +397,7 @@ fn D() {}
// CHECK:STDOUT: %b.param: %i32 = value_param runtime_param0
// CHECK:STDOUT: %b: %i32 = bind_name b, %b.param
// CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1
// CHECK:STDOUT: %.loc23_14: ref %i32 = return_slot %return.param
// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -447,8 +447,8 @@ fn D() {}
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %import_ref.1 = import_ref Main//fns, inst+3, unloaded
// CHECK:STDOUT: %import_ref.2 = import_ref Main//fns, inst+35, unloaded
// CHECK:STDOUT: %import_ref.3 = import_ref Main//fns, inst+62, unloaded
// CHECK:STDOUT: %import_ref.2 = import_ref Main//fns, inst+34, unloaded
// CHECK:STDOUT: %import_ref.3 = import_ref Main//fns, inst+61, unloaded
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
// CHECK:STDOUT: import Core//prelude
// CHECK:STDOUT: import Core//prelude/...
@@ -713,7 +713,7 @@ fn Foo(a: const (const C)) {}
// CHECK:STDOUT: } {
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %return.param.loc7: ref %C = out_param runtime_param0
// CHECK:STDOUT: %.loc7: ref %C = return_slot %return.param.loc7
// CHECK:STDOUT: %return.loc7: ref %C = return_slot %return.param.loc7
// CHECK:STDOUT: }
// CHECK:STDOUT: %Foo.decl.loc8: %Foo.type = fn_decl @Foo [template = constants.%Foo] {
// CHECK:STDOUT: %return.patt: %C = return_slot_pattern
@@ -721,7 +721,7 @@ fn Foo(a: const (const C)) {}
// CHECK:STDOUT: } {
// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C]
// CHECK:STDOUT: %return.param.loc8: ref %C = out_param runtime_param0
// CHECK:STDOUT: %return: ref %C = return_slot %return.param.loc8
// CHECK:STDOUT: %return.loc8: ref %C = return_slot %return.param.loc8
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -733,12 +733,12 @@ fn Foo(a: const (const C)) {}
// CHECK:STDOUT: complete_type_witness = %complete_type
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Foo() -> %return: %C {
// CHECK:STDOUT: fn @Foo() -> %return.param_patt: %C {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %.loc8_25.1: %empty_struct_type = struct_literal ()
// CHECK:STDOUT: %.loc8_25.2: init %C = class_init (), %return [template = constants.%C.val]
// CHECK:STDOUT: %.loc8_25.2: init %C = class_init (), %return.loc8 [template = constants.%C.val]
// CHECK:STDOUT: %.loc8_26: init %C = converted %.loc8_25.1, %.loc8_25.2 [template = constants.%C.val]
// CHECK:STDOUT: return %.loc8_26 to %return
// CHECK:STDOUT: return %.loc8_26 to %return.loc8
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- alias_two_file.carbon
@@ -214,14 +214,14 @@ fn CallSpecific(x: C) -> C {
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @CallSpecific(%x.param_patt: %C) -> %return: %C {
// CHECK:STDOUT: fn @CallSpecific(%x.param_patt: %C) -> %return.param_patt: %C {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %Function.ref: %Function.type = name_ref Function, file.%Function.decl [template = constants.%Function]
// CHECK:STDOUT: %C.ref.loc19: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %x.ref: %C = name_ref x, %x
// CHECK:STDOUT: %Function.specific_fn: <specific function> = specific_function %Function.ref, @Function(constants.%C) [template = constants.%Function.specific_fn.3]
// CHECK:STDOUT: %.loc18_23.2: ref %C = splice_block %return {}
// CHECK:STDOUT: %Function.call: init %C = call %Function.specific_fn(%x.ref) to %.loc18_23.2
// CHECK:STDOUT: %.loc18: ref %C = splice_block %return {}
// CHECK:STDOUT: %Function.call: init %C = call %Function.specific_fn(%x.ref) to %.loc18
// CHECK:STDOUT: return %Function.call to %return
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -426,13 +426,13 @@ fn CallSpecific(x: C) -> C {
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @CallSpecific(%x.param_patt: %C) -> %return: %C {
// CHECK:STDOUT: fn @CallSpecific(%x.param_patt: %C) -> %return.param_patt: %C {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %Function.ref: %Function.type = name_ref Function, file.%Function.decl [template = constants.%Function]
// CHECK:STDOUT: %x.ref: %C = name_ref x, %x
// CHECK:STDOUT: %Function.specific_fn: <specific function> = specific_function %Function.ref, @Function(constants.%C) [template = constants.%Function.specific_fn.3]
// CHECK:STDOUT: %.loc18_23.2: ref %C = splice_block %return {}
// CHECK:STDOUT: %Function.call: init %C = call %Function.specific_fn(%x.ref) to %.loc18_23.2
// CHECK:STDOUT: %.loc18: ref %C = splice_block %return {}
// CHECK:STDOUT: %Function.call: init %C = call %Function.specific_fn(%x.ref) to %.loc18
// CHECK:STDOUT: return %Function.call to %return
// CHECK:STDOUT: }
// CHECK:STDOUT:
+2 -2
View File
@@ -124,7 +124,7 @@ fn F(U:! type, T:! type) -> U* {
// CHECK:STDOUT: %T.param.loc4: type = value_param runtime_param<invalid>
// CHECK:STDOUT: %T.loc4_6.1: type = bind_symbolic_name T, 0, %T.param.loc4 [symbolic = %T.loc4_6.2 (constants.%T)]
// CHECK:STDOUT: %return.param.loc4: ref @F.%ptr.loc4_20.2 (%ptr) = out_param runtime_param0
// CHECK:STDOUT: %.loc4: ref @F.%ptr.loc4_20.2 (%ptr) = return_slot %return.param.loc4
// CHECK:STDOUT: %return.loc4: ref @F.%ptr.loc4_20.2 (%ptr) = return_slot %return.param.loc4
// CHECK:STDOUT: }
// CHECK:STDOUT: %F.decl.loc6: %F.type = fn_decl @F [template = constants.%F] {
// CHECK:STDOUT: %T.patt.loc6: type = symbolic_binding_pattern T, 0 [symbolic = constants.%T.patt]
@@ -137,7 +137,7 @@ fn F(U:! type, T:! type) -> U* {
// CHECK:STDOUT: %T.param.loc6: type = value_param runtime_param<invalid>
// CHECK:STDOUT: %T.loc6: type = bind_symbolic_name T, 0, %T.param.loc6 [symbolic = constants.%T]
// CHECK:STDOUT: %return.param.loc6: ref %ptr = out_param runtime_param0
// CHECK:STDOUT: %return: ref %ptr = return_slot %return.param.loc6
// CHECK:STDOUT: %return.loc6: ref %ptr = return_slot %return.param.loc6
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
+2 -2
View File
@@ -221,7 +221,7 @@ fn CallUndefined() -> i32 {
// CHECK:STDOUT: %x.param.loc4: @Defined.%T.loc4_12.2 (%T) = value_param runtime_param0
// CHECK:STDOUT: %x.loc4: @Defined.%T.loc4_12.2 (%T) = bind_name x, %x.param.loc4
// CHECK:STDOUT: %return.param.loc4: ref @Defined.%T.loc4_12.2 (%T) = out_param runtime_param1
// CHECK:STDOUT: %.loc4: ref @Defined.%T.loc4_12.2 (%T) = return_slot %return.param.loc4
// CHECK:STDOUT: %return.loc4: ref @Defined.%T.loc4_12.2 (%T) = return_slot %return.param.loc4
// CHECK:STDOUT: }
// CHECK:STDOUT: %CallDefined.decl: %CallDefined.type = fn_decl @CallDefined [template = constants.%CallDefined] {
// CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern
@@ -249,7 +249,7 @@ fn CallUndefined() -> i32 {
// CHECK:STDOUT: %x.param.loc10: %T = value_param runtime_param0
// CHECK:STDOUT: %x.loc10: %T = bind_name x, %x.param.loc10
// CHECK:STDOUT: %return.param.loc10: ref %T = out_param runtime_param1
// CHECK:STDOUT: %return: ref %T = return_slot %return.param.loc10
// CHECK:STDOUT: %return.loc10: ref %T = return_slot %return.param.loc10
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT: