-
Notifications
You must be signed in to change notification settings - Fork 18k
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: all.bash failures with -dwarflocationlists hard-wired on #22694
Comments
I did a little archeology on this. The block that the checker is complaining about is:
which clearly violates the "no non-phi after phi rule", but in fact this specific testpoint wasn't added until October, meaning that the locations lists work predates the test (the location lists code was written back in June(ish), then the dev.debug branch was merged into master in August). I'm not familiar enough with the SSA code to know what the right fix is. One thing to do would just be to relax the checking rules to ignore RegKills, since it is pretty clear that they don't correspond to any sort of real value definition. David, maybe you could weigh in on this. @dr2chase |
Thanks. This is working as I intended at the time, and the test could probably be updated to ignore the RegKill ops. Phis put values in registers like anything else, and if one clobbers something that was already in the register before that, there should be a RegKill before it. That was a change in the invariants of the SSA form, but it didn't cause much trouble. In this particular case, since the set of names that's being set on the registers by the Phis match the ones being removed by the RegKills, they're pointless. But I'm pretty sure there are cases where the set of names differ, and then they are necessary. |
Change https://golang.org/cl/77610 mentions this issue: |
Beyond the SSA sanity checker (which should be fixed with 77610) there are also a couple of GDB test failures:
It looks like these two above will go away once my DWARF inlining patch is submitted. After that, there are a set of failures of the following form:
These are due to this line in cmd/compile/internal/gc/main.go:
meaning someone needs to create fill in the DWARF registers for the various non-x86 archs. |
Huh. Interesting that the inlining patch would fix the GDB test. There must be some strange stuff going on with the name table. |
Relax the 'phi after non-phi' SSA sanity check to allow RegKill ops interspersed with phi ops in a block. This fixes a sanity check failure when -dwarflocationlists is enabled. Updates #22694. Change-Id: Iaae604ab6f1a8b150664dd120003727a6fb2f698 Reviewed-on: https://go-review.googlesource.com/77610 Run-TryBot: Than McIntosh <thanm@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
The tests mentioned above all seem to pass when run with |
Thanks Ian-- yes, I agree this can be closed out. |
What version of Go are you using (
go version
)?tip:
go version devel +0cee4b7b78 Mon Nov 13 18:23:38 2017 +0000 linux/amd64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
What did you do?
If I edit cmd/compile/internal/gc/main.go to change the default for -dwarflocationlsts from false to true, I get a number of failures in all.bash.
What did you expect to see?
passing all.bash
What did you see instead?
Specifically of interest, a couple of the SSA tests fail. Example:
and others. My understanding is that we want to eventually make -dwarflocationlists the default, in which case it seems as though these failures should be looked at.
The text was updated successfully, but these errors were encountered: