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

Comments

@josharian
Copy link
Contributor

@josharian josharian commented May 3, 2018

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

@ChrisALiles

This comment has been minimized.

Copy link
Contributor

@ChrisALiles ChrisALiles commented May 8, 2018

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

@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Aug 20, 2018

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

@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Aug 27, 2018

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

@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Aug 28, 2018

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

@ChrisALiles

This comment has been minimized.

Copy link
Contributor

@ChrisALiles ChrisALiles commented Aug 31, 2018

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

@ChrisALiles

This comment has been minimized.

Copy link
Contributor

@ChrisALiles ChrisALiles commented Oct 14, 2018

@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

This comment has been minimized.

Copy link
Member

@rasky rasky commented Oct 14, 2018

@ChrisALiles

This comment has been minimized.

Copy link
Contributor

@ChrisALiles ChrisALiles commented Oct 14, 2018

@rasky

This comment has been minimized.

Copy link
Member

@rasky rasky commented Oct 14, 2018

@ChrisALiles

This comment has been minimized.

Copy link
Contributor

@ChrisALiles ChrisALiles commented Oct 15, 2018

@josharian

This comment has been minimized.

Copy link
Contributor Author

@josharian josharian commented Oct 15, 2018

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. :)

@gopherbot gopherbot closed this in 13d5cd7 Oct 23, 2018
@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.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.