Remove parse nodes from constants. (#3599)

These instructions are intended to be shared across all uses and so
don't have a meaningful location. So far, only type constants are
shared.
This commit is contained in:
Richard Smith
2024-01-13 04:52:25 +00:00
committed by GitHub
parent e305c896a1
commit d712bf12a6
235 changed files with 1773 additions and 1805 deletions
+16 -16
View File
@@ -15,14 +15,14 @@ fn G() -> i32 {
// CHECK:STDOUT: --- function_param.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %.loc7_17: i32 = int_literal 3 [template]
// CHECK:STDOUT: %.loc7_18.1: type = array_type %.loc7_17, i32 [template]
// CHECK:STDOUT: %.loc7_18.2: type = ptr_type [i32; 3] [template]
// CHECK:STDOUT: %.loc12_13: i32 = int_literal 1 [template]
// CHECK:STDOUT: %.loc12_16: i32 = int_literal 2 [template]
// CHECK:STDOUT: %.loc12_19: i32 = int_literal 3 [template]
// CHECK:STDOUT: %.loc12_20: type = tuple_type (i32, i32, i32) [template]
// CHECK:STDOUT: %.loc12_23: i32 = int_literal 1 [template]
// CHECK:STDOUT: %.1: i32 = int_literal 3 [template]
// CHECK:STDOUT: %.2: type = array_type %.1, i32 [template]
// CHECK:STDOUT: %.3: type = ptr_type [i32; 3] [template]
// CHECK:STDOUT: %.4: i32 = int_literal 1 [template]
// CHECK:STDOUT: %.5: i32 = int_literal 2 [template]
// CHECK:STDOUT: %.6: i32 = int_literal 3 [template]
// CHECK:STDOUT: %.7: type = tuple_type (i32, i32, i32) [template]
// CHECK:STDOUT: %.8: i32 = int_literal 1 [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -44,11 +44,11 @@ fn G() -> i32 {
// CHECK:STDOUT: fn @G() -> i32 {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %F.ref: <function> = name_ref F, file.%F [template = file.%F]
// CHECK:STDOUT: %.loc12_13: i32 = int_literal 1 [template = constants.%.loc12_13]
// CHECK:STDOUT: %.loc12_16: i32 = int_literal 2 [template = constants.%.loc12_16]
// CHECK:STDOUT: %.loc12_19: i32 = int_literal 3 [template = constants.%.loc12_19]
// CHECK:STDOUT: %.loc12_13: i32 = int_literal 1 [template = constants.%.4]
// CHECK:STDOUT: %.loc12_16: i32 = int_literal 2 [template = constants.%.5]
// CHECK:STDOUT: %.loc12_19: i32 = int_literal 3 [template = constants.%.6]
// CHECK:STDOUT: %.loc12_20.1: (i32, i32, i32) = tuple_literal (%.loc12_13, %.loc12_16, %.loc12_19)
// CHECK:STDOUT: %.loc12_23: i32 = int_literal 1 [template = constants.%.loc12_23]
// CHECK:STDOUT: %.loc12_23: i32 = int_literal 1 [template = constants.%.8]
// CHECK:STDOUT: %.loc12_20.2: ref [i32; 3] = temporary_storage
// CHECK:STDOUT: %.loc12_20.3: i32 = int_literal 0
// CHECK:STDOUT: %.loc12_20.4: ref i32 = array_index %.loc12_20.2, %.loc12_20.3
@@ -63,9 +63,9 @@ fn G() -> i32 {
// CHECK:STDOUT: %.loc12_20.13: init [i32; 3] = converted %.loc12_20.1, %.loc12_20.12
// CHECK:STDOUT: %.loc12_20.14: ref [i32; 3] = temporary %.loc12_20.2, %.loc12_20.13
// CHECK:STDOUT: %.loc12_20.15: [i32; 3] = bind_value %.loc12_20.14
// CHECK:STDOUT: %.loc12_11: init i32 = call %F.ref(%.loc12_20.15, %.loc12_23)
// CHECK:STDOUT: %.loc12_25.1: i32 = value_of_initializer %.loc12_11
// CHECK:STDOUT: %.loc12_25.2: i32 = converted %.loc12_11, %.loc12_25.1
// CHECK:STDOUT: return %.loc12_25.2
// CHECK:STDOUT: %.loc12_11.1: init i32 = call %F.ref(%.loc12_20.15, %.loc12_23)
// CHECK:STDOUT: %.loc12_25: i32 = value_of_initializer %.loc12_11.1
// CHECK:STDOUT: %.loc12_11.2: i32 = converted %.loc12_11.1, %.loc12_25
// CHECK:STDOUT: return %.loc12_11.2
// CHECK:STDOUT: }
// CHECK:STDOUT: