]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: split 3 operand LEA in late lower pass
authorWayne Zuo <wdvxdr@golangcn.org>
Fri, 7 Oct 2022 04:19:32 +0000 (12:19 +0800)
committerKeith Randall <khr@google.com>
Mon, 17 Oct 2022 15:11:16 +0000 (15:11 +0000)
commit1c783f7c68aae4effd6dcc9692a6574418556ebb
treea4186a0be6fd257fc818f5d837a180cfe77ccb31
parent7ffc1e47b4e3b163f06fc33c9adbc29cb1622d47
cmd/compile: split 3 operand LEA in late lower pass

On newer amd64 cpus 3 operand LEA instructions are slow, CL 114655 split
them to 2 LEA instructions in genssa.

This CL make late lower pass run after addressing modes, and split 3
operand LEA in late lower pass so that we can do common-subexpression
elimination for splited LEAs.

Updates #21735

Change-Id: Ied49139c7abab655e1a14a6fd793bdf9f987d1f1
Reviewed-on: https://go-review.googlesource.com/c/go/+/440035
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Wayne Zuo <wdvxdr@golangcn.org>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Joedian Reid <joedian@golang.org>
src/cmd/compile/internal/ssa/_gen/AMD64latelower.rules [new file with mode: 0644]
src/cmd/compile/internal/ssa/compile.go
src/cmd/compile/internal/ssa/config.go
src/cmd/compile/internal/ssa/rewriteAMD64latelower.go [new file with mode: 0644]