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: slow bitmap generation for large array of zero-size elements #20739

Closed
mdempsky opened this issue Jun 20, 2017 · 3 comments

Comments

Projects
None yet
4 participants
@mdempsky
Copy link
Member

commented Jun 20, 2017

This (nonsense, but valid) program takes a very long time to compile because of stack bitmap generation:

package f

func F() {
    var x struct {
            x *int
            w [1e10][1e10][1e10][0]*int
            y *int
    }
    println(&x)
}

The easy fix is to short-circuit generating stack bitmaps for zero-size types.

@mdempsky mdempsky added this to the Go1.10 milestone Jun 20, 2017

@bradfitz bradfitz added the NeedsFix label Jun 20, 2017

@meggamind

This comment has been minimized.

Copy link

commented Jun 21, 2017

Can I pick this issue ?

@mdempsky mdempsky self-assigned this Jun 22, 2017

@mdempsky

This comment has been minimized.

Copy link
Member Author

commented Jun 22, 2017

@meggamind Thanks, but I already have a fix + general cleanup for the issue. I would suggest another issue.

You're of course welcome to still look into it if you're just looking for practice working on the compiler.

@gopherbot

This comment has been minimized.

Copy link

commented Sep 19, 2017

Change https://golang.org/cl/64471 mentions this issue: cmd/compile: refactor onebitwalktype1

@gopherbot gopherbot closed this in 39983cf Sep 20, 2017

@golang golang locked and limited conversation to collaborators Sep 20, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.