-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/compile: sparse conditional constant propagation #60469
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
Conversation
This PR (HEAD: d86fb02) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/498795 to see it. Tip: You can toggle comments from me using the |
Message from Keith Randall: Patch Set 1: Code-Review+2 Run-TryBot+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/498795. |
Message from Keith Randall: Patch Set 1: Code-Review+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/498795. |
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/498795. |
Message from Gopher Robot: Patch Set 1: TryBot-Result+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/498795. |
Message from Heschi Kreinick: Patch Set 1: Code-Review+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/498795. |
sparse conditional constant propagation can discover optimization opportunities that cannot be found by just combining constant folding and constant propagation and dead code elimination separately. Updates golang#59399
See https://go-review.googlesource.com/c/go/+/483875 for more details. This happens when sccp generates a temporary Value v217 and it attempts to apply rewrite rule on it to see if v217 can be fold to constant value, v227 = Const64 <int32> v117 = Const32 <int32> [3] v217 = Mul32 <int32> v117 v227 In this case, v217 can not match any rules in generic rules, so it left in entry block while its arguments lives other blocks, which breaks the dominance relationship. These temporary values are dead values and will be removed in further deadcode phase but checkFunc catches them because it runs right after every pass. The proposed fix is to invalidate unmatched temporary value immediately.
This PR (HEAD: 830016f) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/498795. Important tips:
|
Message from Keith Randall: Patch Set 2: Code-Review+2 Commit-Queue+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/498795. |
Message from Go LUCI: Patch Set 2: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2023-09-12T20:36:05Z","revision":"29f8e84250e08c95b728ffead831a16a8c2a5996"} Please don’t reply on this GitHub thread. Visit golang.org/cl/498795. |
Message from Keith Randall: Patch Set 2: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/498795. |
Message from Go LUCI: Patch Set 2: This CL has passed the run Please don’t reply on this GitHub thread. Visit golang.org/cl/498795. |
Message from Go LUCI: Patch Set 2: LUCI-TryBot-Result+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/498795. |
sparse conditional constant propagation can discover optimization opportunities that cannot be found by just combining constant folding and constant propagation and dead code elimination separately. This is a re-submit of PR#59575, which fix a broken dominance relationship caught by ssacheck Updates #59399 Change-Id: I57482dee38f8e80a610aed4f64295e60c38b7a47 GitHub-Last-Rev: 830016f GitHub-Pull-Request: #60469 Reviewed-on: https://go-review.googlesource.com/c/go/+/498795 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Heschi Kreinick <heschi@google.com> Reviewed-by: Keith Randall <khr@golang.org>
This PR is being closed because golang.org/cl/498795 has been merged. |
sparse conditional constant propagation can discover optimization
opportunities that cannot be found by just combining constant folding
and constant propagation and dead code elimination separately.
This is a re-submit of PR#59575, which fix a broken dominance relationship caught by ssacheck
Updates #59399