mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
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:
@@ -10,6 +10,10 @@ fn Main() {
|
||||
Foo();
|
||||
}
|
||||
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %.loc10: type = tuple_type ()
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file "params_zero.carbon" {
|
||||
// CHECK:STDOUT: %Foo: <function> = fn_decl @Foo
|
||||
// CHECK:STDOUT: %Main: <function> = fn_decl @Main
|
||||
@@ -23,7 +27,6 @@ fn Main() {
|
||||
// CHECK:STDOUT: fn @Main() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %Foo.ref: <function> = name_reference "Foo", file.%Foo
|
||||
// CHECK:STDOUT: %.loc10_6.1: type = tuple_type ()
|
||||
// CHECK:STDOUT: %.loc10_6.2: init () = call %Foo.ref()
|
||||
// CHECK:STDOUT: %.loc10: init () = call %Foo.ref()
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
Reference in New Issue
Block a user