Use TupleAccess instead of TupleIndex (#4318)

This change removes the `TupleIndex` instruction, and instead
consolidate it with the `TupleAccess` instruction, per this
[discussion](https://discord.com/channels/655572317891461132/655578254970716160/1271195835975204946).
This change, in turn removes `AnyAggregateIndex`.
This commit is contained in:
Brymer Meneses
2024-09-17 20:26:48 +00:00
committed by GitHub
parent da40c8b076
commit 7f930d0f58
34 changed files with 75 additions and 125 deletions
+2 -2
View File
@@ -147,7 +147,7 @@ fn F() {
// CHECK:STDOUT: %t0: ref %.6 = bind_name t0, %t0.var
// CHECK:STDOUT: %t.ref.loc19: ref %.8 = name_ref t, %t
// CHECK:STDOUT: %.loc19_21: i32 = int_literal 0 [template = constants.%.10]
// CHECK:STDOUT: %.loc19_20: ref i32 = tuple_index %t.ref.loc19, %.loc19_21
// CHECK:STDOUT: %.loc19_20: ref i32 = tuple_access %t.ref.loc19, element0
// CHECK:STDOUT: %.loc19_18: %.6 = addr_of %.loc19_20
// CHECK:STDOUT: assign %t0.var, %.loc19_18
// CHECK:STDOUT: %int.make_type_32.loc20: init type = call constants.%Int32() [template = i32]
@@ -158,7 +158,7 @@ fn F() {
// CHECK:STDOUT: %t1: ref %.6 = bind_name t1, %t1.var
// CHECK:STDOUT: %t.ref.loc20: ref %.8 = name_ref t, %t
// CHECK:STDOUT: %.loc20_21: i32 = int_literal 1 [template = constants.%.4]
// CHECK:STDOUT: %.loc20_20: ref i32 = tuple_index %t.ref.loc20, %.loc20_21
// CHECK:STDOUT: %.loc20_20: ref i32 = tuple_access %t.ref.loc20, element1
// CHECK:STDOUT: %.loc20_18: %.6 = addr_of %.loc20_20
// CHECK:STDOUT: assign %t1.var, %.loc20_18
// CHECK:STDOUT: return
@@ -278,7 +278,7 @@ fn AddressOfParam(param: i32) {
// CHECK:STDOUT: %.loc92_12: i32 = int_literal 0 [template = constants.%.3]
// CHECK:STDOUT: %tuple: %.13 = tuple_value (%.loc92_6, %.loc92_9) [template = constants.%tuple]
// CHECK:STDOUT: %.loc92_10.2: %.13 = converted %.loc92_10.1, %tuple [template = constants.%tuple]
// CHECK:STDOUT: %.loc92_11: i32 = tuple_index %.loc92_10.2, %.loc92_12 [template = constants.%.11]
// CHECK:STDOUT: %.loc92_11: i32 = tuple_access %.loc92_10.2, element0 [template = constants.%.11]
// CHECK:STDOUT: %.loc92_3: %.4 = addr_of <error> [template = <error>]
// CHECK:STDOUT: return
// CHECK:STDOUT: }