]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: move early deadcode into unified writer
authorMatthew Dempsky <mdempsky@google.com>
Wed, 9 Aug 2023 11:05:35 +0000 (04:05 -0700)
committerGopher Robot <gobot@golang.org>
Fri, 11 Aug 2023 18:03:52 +0000 (18:03 +0000)
commit59037ac93a49889eb6a7d6b3b8fbc70321615f1f
treeae6897c814f010098508ea40f297ecbed12210ff
parent832212df9aba985bdc6a8378a821e1030554fa2f
cmd/compile: move early deadcode into unified writer

This CL moves the early deadcode elimination pass into the unified
writer. This allows shrinking the export data, by simplifying
expressions and removing unreachable statements. It also means we
don't need to repeatedly apply deadcode elimination on inlined calls
or instantiated generics.

Change-Id: I19bdb04861e50815fccdab39790f4aaa076121fd
Reviewed-on: https://go-review.googlesource.com/c/go/+/517775
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/cmd/compile/internal/deadcode/deadcode.go [deleted file]
src/cmd/compile/internal/gc/main.go
src/cmd/compile/internal/noder/reader.go
src/cmd/compile/internal/noder/writer.go