Add a separate store for computed constant values. (#3362)

This moves the instructions generated for type values out of the block
in which they happen to first be referenced, and into shared storage.
This commit is contained in:
Richard Smith
2023-11-04 23:48:13 +00:00
committed by GitHub
parent a0bacbb26b
commit 184eafd521
130 changed files with 1075 additions and 625 deletions
+5 -1
View File
@@ -12,8 +12,12 @@ fn Main() {
Echo({});
}
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %.loc7_13.1: type = struct_type {}
// CHECK:STDOUT: %.loc7_13.2: type = tuple_type ()
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file "empty_struct.carbon" {
// CHECK:STDOUT: %.loc7: type = tuple_type ()
// CHECK:STDOUT: %Echo: <function> = fn_decl @Echo
// CHECK:STDOUT: %Main: <function> = fn_decl @Main
// CHECK:STDOUT: }