-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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: [dev.ssa] no-opt build broken #12347
Comments
CL https://golang.org/cl/13986 mentions this issue. |
…elim Add a check to make sure value arguments dominate the value. Phi elim output used to fail this test. When eliminating redundant phis, phi elim was using one of the args and not the ultimate source. For example: b1: x = ... -> b2 b3 b2: y = Copy x b3: z = Copy x -> b4 -> b4 b4: w = phi y z Phi elim eliminates w, but it used to replace w with (Copy y). That's bad as b2 does not dominate b4. Instead we should replace w with (Copy x). Fixes #12347 Change-Id: I9f340cdabcda8e2e90359fb4f9250877b1fffe98 Reviewed-on: https://go-review.googlesource.com/13986 Reviewed-by: David Chase <drchase@google.com>
Ok, that fix was somewhat of a red herring. What's going on is this: b1 -> b2 All of which are on the dead side of a constant branch. b2 uses a value x from b1. When we detect that b1 is dead during machine-independent optimization, we mark b1 as dead and remove all its values, including x. But b2 & b3 form a loop, so they are not removed during this phase (they will be during deadcode, but that is a separate pass). So the user of x is still around, and check complains that it has a missing arg. |
|
CL https://golang.org/cl/14033 mentions this issue. |
Instead of trying to delete dead code as soon as we find it, just mark it as dead using a PlainAndDead block kind. The deadcode pass will do the real removal. This way is somewhat more efficient because we don't need to mess with successor and predecessor lists of all the dead blocks. Fixes #12347 Change-Id: Ia42d6b5f9cdb3215a51737b3eb117c00bd439b13 Reviewed-on: https://go-review.googlesource.com/14033 Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
CL 13683 broke the no-opt (
-gcflags="-N -l"
) build. The first failure log is:http://build.golang.org/log/51a0a72aa149162a4a96a94a432c3160310c41fb
I haven't looked into it at all.
The text was updated successfully, but these errors were encountered: