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
@@ -95,7 +95,7 @@ fn Main() {
// CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo]
// CHECK:STDOUT: %x.ref: ref %.3 = name_ref x, %x
// CHECK:STDOUT: %.loc16_9: i32 = int_literal 0 [template = constants.%.5]
// CHECK:STDOUT: %.loc16_8.1: ref i32 = tuple_index %x.ref, %.loc16_9
// CHECK:STDOUT: %.loc16_8.1: ref i32 = tuple_access %x.ref, element0
// CHECK:STDOUT: %.loc16_12: i32 = int_literal 6 [template = constants.%.6]
// CHECK:STDOUT: %.loc16_8.2: i32 = bind_value %.loc16_8.1
// CHECK:STDOUT: %Foo.call: init %.1 = call %Foo.ref(%.loc16_8.2, %.loc16_12)
+1 -1
View File
@@ -209,7 +209,7 @@ fn D() {}
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %c.ref: %.3 = name_ref c, %c
// CHECK:STDOUT: %.loc6_47: i32 = int_literal 0 [template = constants.%.5]
// CHECK:STDOUT: %.loc6_46: i32 = tuple_index %c.ref, %.loc6_47
// CHECK:STDOUT: %.loc6_46: i32 = tuple_access %c.ref, element0
// CHECK:STDOUT: %.loc6_48: %.4 = struct_literal (%.loc6_46)
// CHECK:STDOUT: %struct: %.4 = struct_value (%.loc6_46)
// CHECK:STDOUT: %.loc6_49: %.4 = converted %.loc6_48, %struct