]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: update README to reflect dead code elimination changes
authorfunc25 <phuongle0205@gmail.com>
Sun, 23 Jun 2024 05:53:47 +0000 (05:53 +0000)
committerGopher Robot <gobot@golang.org>
Tue, 25 Jun 2024 00:11:57 +0000 (00:11 +0000)
The description of middle-end dead code elimination is inconsistent with the current implementation.

The early dead code elimination pass of IR nodes is no longer located in cmd/compile/internal/deadcode and is no longer called by gc/main.go:Main. It has been moved to the unified IR writer phase. This update modifies the README to reflect this architectural change.

Change-Id: I78bd486edefd6b02948fee7de9ce6c83b147bc1d
GitHub-Last-Rev: 76493ce8b08cd585d761d65d29b984360f7ee628
GitHub-Pull-Request: golang/go#68134
Reviewed-on: https://go-review.googlesource.com/c/go/+/593638
Reviewed-by: Robert Griesemer <gri@google.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Keith Randall <khr@golang.org>

src/cmd/compile/README.md

index 3fc7ca6ec6699baf7a3d470a208484011896f37d..cffb4e7a80fa933872d25c432349676a411ae037 100644 (file)
@@ -63,7 +63,6 @@ Unified IR is also involved in import/export of packages and inlining.
 
 ### 4. Middle end
 
-* `cmd/compile/internal/deadcode` (dead code elimination)
 * `cmd/compile/internal/inline` (function call inlining)
 * `cmd/compile/internal/devirtualize` (devirtualization of known interface method calls)
 * `cmd/compile/internal/escape` (escape analysis)
@@ -72,6 +71,8 @@ Several optimization passes are performed on the IR representation:
 dead code elimination, (early) devirtualization, function call
 inlining, and escape analysis.
 
+The early dead code elimination pass is integrated into the unified IR writer phase.
+
 ### 5. Walk
 
 * `cmd/compile/internal/walk` (order of evaluation, desugaring)