Move instruction names for struct and tuple values from lower to InstNamer. (#3918)

Change the names for emitted globals for constants with storage to
include both the name of the constant and the name of the use.

This causes the instructions to also be named in SemIR and in LLVM IR
constants.
This commit is contained in:
Richard Smith
2024-04-26 23:47:08 +00:00
committed by GitHub
parent 79c0b65288
commit 008d41d7f3
148 changed files with 1297 additions and 1271 deletions
+3 -3
View File
@@ -22,7 +22,7 @@ fn G() -> i32 {
// CHECK:STDOUT: %.5: i32 = int_literal 2 [template]
// CHECK:STDOUT: %.6: type = tuple_type (i32, i32, i32) [template]
// CHECK:STDOUT: %.7: i32 = int_literal 0 [template]
// CHECK:STDOUT: %.8: [i32; 3] = tuple_value (%.4, %.5, %.1) [template]
// CHECK:STDOUT: %array: [i32; 3] = tuple_value (%.4, %.5, %.1) [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -74,8 +74,8 @@ fn G() -> i32 {
// CHECK:STDOUT: %.loc12_20.9: i32 = int_literal 2 [template = constants.%.5]
// CHECK:STDOUT: %.loc12_20.10: ref i32 = array_index %.loc12_20.2, %.loc12_20.9
// CHECK:STDOUT: %.loc12_20.11: init i32 = initialize_from %.loc12_19 to %.loc12_20.10 [template = constants.%.1]
// CHECK:STDOUT: %.loc12_20.12: init [i32; 3] = array_init (%.loc12_20.5, %.loc12_20.8, %.loc12_20.11) to %.loc12_20.2 [template = constants.%.8]
// CHECK:STDOUT: %.loc12_11.1: init [i32; 3] = converted %.loc12_20.1, %.loc12_20.12 [template = constants.%.8]
// CHECK:STDOUT: %.loc12_20.12: init [i32; 3] = array_init (%.loc12_20.5, %.loc12_20.8, %.loc12_20.11) to %.loc12_20.2 [template = constants.%array]
// CHECK:STDOUT: %.loc12_11.1: init [i32; 3] = converted %.loc12_20.1, %.loc12_20.12 [template = constants.%array]
// CHECK:STDOUT: %.loc12_11.2: ref [i32; 3] = temporary %.loc12_20.2, %.loc12_11.1
// CHECK:STDOUT: %.loc12_11.3: [i32; 3] = bind_value %.loc12_11.2
// CHECK:STDOUT: %F.call: init i32 = call %F.ref(%.loc12_11.3, %.loc12_23)