diff options
| author | Matthew Dempsky <mdempsky@google.com> | 2022-07-26 21:52:42 -0700 |
|---|---|---|
| committer | Matthew Dempsky <mdempsky@google.com> | 2022-07-28 07:31:47 +0000 |
| commit | f9959460940140b280be1f5591ae38b9ab74182e (patch) | |
| tree | 24dc74e64bc237275446759246b829a819307f01 /src/internal/pkgbits/syncmarker_string.go | |
| parent | f2851c67fd103b8dd7e84e3d35b896ea49ea4af5 (diff) | |
| download | go-f9959460940140b280be1f5591ae38b9ab74182e.tar.xz | |
[dev.unified] cmd/compile: implement simple inline body pruning heuristic
An important optimization in the existing export data format is the
pruning of unreachable inline bodies. That is, when re-exporting
transitively imported types, omitting the inline bodies for methods
that can't actually be needed due to importing that package.
The existing logic (implemented in typecheck/crawler.go) is fairly
sophisticated, but also relies on actually expanding inline bodies in
the process, which is undesirable. However, including all inline
bodies is also prohibitive for testing GOEXPERIMENT=unified against
very large Go code bases that impose size limits on build action
inputs.
As a short-term solution, this CL implements a simple heuristic for
GOEXPERIMENT=unified: include the inline bodies for all
locally-declared functions/methods, and for any imported
functions/methods that were inlined into this package.
Change-Id: I686964a0cd9262b77d3d5587f89cfbcfe8b2e521
Reviewed-on: https://go-review.googlesource.com/c/go/+/419675
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Diffstat (limited to 'src/internal/pkgbits/syncmarker_string.go')
0 files changed, 0 insertions, 0 deletions
