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 proved bounds to remove signed division fix-ups #25239

Closed
josharian opened this issue May 3, 2018 · 11 comments
Closed

cmd/compile: use proved bounds to remove signed division fix-ups #25239

josharian opened this issue May 3, 2018 · 11 comments
Labels
FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done. Performance
Milestone

Comments

@josharian
Copy link
Contributor

We currently emit fix-up code for signed division by -1 as part of genssa.

However, we may be able to prove during the prove pass or generic rules that the divisor cannot be -1. If so, we can save that info and use it during genssa. The Go 1.11 cycle introduced some such optimizations for some math/bits intrinsics and shifts.

This might also provide a tidy means to accomplish this TODO from amd64/ssa.go:

		// TODO(khr): issue only the -1 fixup code we need.
		// For instance, if only the quotient is used, no point in zeroing the remainder.

cc @rasky

@josharian josharian added Performance help wanted NeedsFix The path to resolution is known, but the work has not been done. labels May 3, 2018
@josharian josharian added this to the Go1.12 milestone May 3, 2018
@ChrisALiles
Copy link
Contributor

I would like to have a look at this, hoping to make ssa a little less opaque to me than it is now.

@gopherbot
Copy link

Change https://golang.org/cl/130215 mentions this issue: cmd/compile: use proved bounds to remove signed division fix-ups

@gopherbot
Copy link

Change https://golang.org/cl/131318 mentions this issue: cmd/compile: use proved bounds to remove signed division fix-ups

@gopherbot
Copy link

Change https://golang.org/cl/131795 mentions this issue: cmd/compile: use proved bounds to remove signed division fix-ups

@ChrisALiles
Copy link
Contributor

Changes 131318 nd 131795 were sent by mistake - they have been abandoned.

@ChrisALiles
Copy link
Contributor

@rasky, @randall77, @josharian
Have I done something to stop CL 130215 in it's tracks?
Are you waiting for me to do something/fix something?

@rasky
Copy link
Member

rasky commented Oct 14, 2018 via email

@ChrisALiles
Copy link
Contributor

ChrisALiles commented Oct 14, 2018 via email

@rasky
Copy link
Member

rasky commented Oct 14, 2018 via email

@ChrisALiles
Copy link
Contributor

ChrisALiles commented Oct 15, 2018 via email

@josharian
Copy link
Contributor Author

Thanks for your persistence. And as Giovanni said, don’t hesitate to ping occasionally. All the reviewers are all too human—busy, distractible, forgetful, imperfect. :)

@golang golang locked and limited conversation to collaborators Oct 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done. Performance
Projects
None yet
Development

No branches or pull requests

4 participants