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: take into account that floating point special cases (NaN, Inf) are unlikely #25125

Open
mundaym opened this Issue Apr 27, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@mundaym
Member

mundaym commented Apr 27, 2018

math.IsNaN and math.IsInf are very unlikely to return true. It would be nice to use this information for code layout.

I have hacked together a prototype using SSA rules but there is probably a better way to do it. The prototype is here: https://go-review.googlesource.com/c/go/+/64191. Feel free to take that and improve it.

@mundaym mundaym added this to the Unplanned milestone Apr 27, 2018

@josharian

This comment has been minimized.

Contributor

josharian commented Apr 27, 2018

Haven't looked at the CL, but naively it seems like the likelyadjust pass is the right place to do this.

@bcmills

This comment has been minimized.

Member

bcmills commented Apr 27, 2018

I would certainly believe that math.IsNaN is usually false. I suspect that math.IsInf depends on the application.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment