mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.ssa] cmd/compile: optimize phi ops
Redo how we keep track of forward references when building SSA. When the forward reference is resolved, update the Value node in place. Improve the phi elimination pass so it can simplify phis of phis. Give SSA package access to decoded line numbers. Fix line numbers for constant booleans. Change-Id: I3dc9896148d260be2f3dd14cbe5db639ec9fa6b7 Reviewed-on: https://go-review.googlesource.com/18674 Reviewed-by: David Chase <drchase@google.com> Run-TryBot: Keith Randall <khr@golang.org>
This commit is contained in:
parent
23d5810c8f
commit
b5c5efd5de
8 changed files with 145 additions and 95 deletions
|
|
@ -81,8 +81,9 @@ type pass struct {
|
|||
|
||||
// list of passes for the compiler
|
||||
var passes = [...]pass{
|
||||
{"phielim", phielim},
|
||||
{"copyelim", copyelim},
|
||||
// TODO: combine phielim and copyelim into a single pass?
|
||||
{"early phielim", phielim},
|
||||
{"early copyelim", copyelim},
|
||||
{"early deadcode", deadcode}, // remove generated dead code to avoid doing pointless work during opt
|
||||
{"decompose", decompose},
|
||||
{"opt", opt},
|
||||
|
|
@ -97,6 +98,9 @@ var passes = [...]pass{
|
|||
{"lowered cse", cse},
|
||||
{"lowered deadcode", deadcode},
|
||||
{"checkLower", checkLower},
|
||||
{"late phielim", phielim},
|
||||
{"late copyelim", copyelim},
|
||||
{"late deadcode", deadcode},
|
||||
{"critical", critical}, // remove critical edges
|
||||
{"layout", layout}, // schedule blocks
|
||||
{"schedule", schedule}, // schedule values
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue