Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/compile: use bounded shift information on non-amd64 architectures #25167

Open
josharian opened this issue Apr 29, 2018 · 5 comments
Open
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. help wanted Performance Suggested Issues that may be good for new contributors looking for work to do.
Milestone

Comments

@josharian
Copy link
Contributor

CL 109776 optimized some shifts on amd64. We should apply the same straightforward optimization rule changes to other architectures.

Might be a good starter SSA issue.

cc @mundaym @cherrymui

@josharian josharian added Suggested Issues that may be good for new contributors looking for work to do. Performance help wanted labels Apr 29, 2018
@josharian josharian added this to the Unplanned milestone Apr 29, 2018
@mundaym
Copy link
Member

mundaym commented Apr 30, 2018

cc @laboger and @ceseo for ppc64le.

@gopherbot
Copy link

Change https://golang.org/cl/110070 mentions this issue: cmd/compile: simplify shift lowering on s390x

@laboger
Copy link
Contributor

laboger commented May 1, 2018

We can look at this for ppc64le in the next release.

gopherbot pushed a commit that referenced this issue May 8, 2018
Use conditional moves instead of subtractions with borrow to handle
saturation cases. This allows us to delete the SUBE/SUBEW ops and
associated rules from the SSA backend. Using conditional moves also
means we can detect when shift values are masked so I've added some
new rules to constant fold the relevant comparisons and masking ops.

Also use the new shiftIsBounded() function to avoid generating code
to handle saturation cases where possible.

Updates #25167 for s390x.

Change-Id: Ief9991c91267c9151ce4c5ec07642abb4dcc1c0d
Reviewed-on: https://go-review.googlesource.com/110070
Run-TryBot: Michael Munday <mike.munday@ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
@gopherbot
Copy link

Change https://golang.org/cl/135380 mentions this issue: cmd/compile: use bounded shift information on ppc64x

gopherbot pushed a commit that referenced this issue Sep 18, 2018
Makes use of bounded shift information to generate
more efficient shift instructions.

Updates #25167 for ppc64x

Change-Id: I7fc8d49a3fb3e0f273cc51bc767470b239cbdca7
Reviewed-on: https://go-review.googlesource.com/135380
Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Michael Munday <mike.munday@ibm.com>
@gopherbot
Copy link

Change https://golang.org/cl/182558 mentions this issue: cmd/compile: optimize bounded shifts on wasm

gopherbot pushed a commit that referenced this issue Aug 28, 2019
Use the shiftIsBounded function to generate more efficient
Shift instructions.

Updates #25167

Change-Id: Id350f8462dc3a7ed3bfed0bcbea2860b8f40048a
Reviewed-on: https://go-review.googlesource.com/c/go/+/182558
Run-TryBot: Agniva De Sarker <agniva.quicksilver@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Richard Musiol <neelance@gmail.com>
tomocy pushed a commit to tomocy/go that referenced this issue Sep 1, 2019
Use the shiftIsBounded function to generate more efficient
Shift instructions.

Updates golang#25167

Change-Id: Id350f8462dc3a7ed3bfed0bcbea2860b8f40048a
Reviewed-on: https://go-review.googlesource.com/c/go/+/182558
Run-TryBot: Agniva De Sarker <agniva.quicksilver@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Richard Musiol <neelance@gmail.com>
t4n6a1ka pushed a commit to t4n6a1ka/go that referenced this issue Sep 5, 2019
Use the shiftIsBounded function to generate more efficient
Shift instructions.

Updates golang#25167

Change-Id: Id350f8462dc3a7ed3bfed0bcbea2860b8f40048a
Reviewed-on: https://go-review.googlesource.com/c/go/+/182558
Run-TryBot: Agniva De Sarker <agniva.quicksilver@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Richard Musiol <neelance@gmail.com>
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. help wanted Performance Suggested Issues that may be good for new contributors looking for work to do.
Projects
None yet
Development

No branches or pull requests

4 participants