Reduce the size of formatted SemIR. (#4534)

- Do not include entities imported from files that we are not dumping.
- Do not include constants and import_refs that are not referenced by
something that we are including in the formatted output.

---------

Co-authored-by: Jon Ross-Perkins <jperkins@google.com>
Co-authored-by: Carbon Infra Bot <carbon-external-infra@google.com>
This commit is contained in:
Richard Smith
2024-11-15 21:00:26 +00:00
committed by GitHub
co-authored by Jon Ross-Perkins Carbon Infra Bot
parent 3c18a6c477
commit 4ee65ef58a
557 changed files with 319 additions and 11200 deletions
-3
View File
@@ -46,7 +46,6 @@ fn While() {
// CHECK:STDOUT: import Core//prelude
// CHECK:STDOUT: import Core//prelude/...
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref: %Bool.type = import_ref Core//prelude/types/bool, inst+5, loaded [template = constants.%Bool]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -75,8 +74,6 @@ fn While() {
// CHECK:STDOUT: %While.decl: %While.type = fn_decl @While [template = constants.%While] {} {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Bool() -> type = "bool.make_type";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Cond() -> bool;
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F();