[go] cmd/compile: don't rely on loop info when there are irreducible loops

0 views
Skip to first unread message

Keith Randall (Gerrit)

unread,
Sep 24, 2025, 6:24:41 PM (7 days ago) Sep 24
to Keith Randall, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, David Chase, Go LUCI, golang-co...@googlegroups.com

Keith Randall submitted the change

Change information

Commit message:
cmd/compile: don't rely on loop info when there are irreducible loops

Loop information is sketchy when there are irreducible loops.
Sometimes blocks inside 2 loops can be recorded as only being part of
the outer loop. That causes tighten to move values that want to move
into such a block to move out of the loop altogether, breaking the
invariant that operations have to be scheduled after their args.

Fixes #75569
Change-Id: Idd80e6d2268094b8ae6387563081fdc1e211856a
Reviewed-by: David Chase <drc...@google.com>
Reviewed-by: Keith Randall <k...@google.com>
Files:
  • M src/cmd/compile/internal/ssa/tighten.go
  • A test/fixedbugs/issue75569.go
Change size: M
Delta: 2 files changed, 92 insertions(+), 12 deletions(-)
Branch: refs/heads/master
Submit Requirements:
  • requirement satisfiedCode-Review: +2 by David Chase, +1 by Keith Randall
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: Idd80e6d2268094b8ae6387563081fdc1e211856a
Gerrit-Change-Number: 706355
Gerrit-PatchSet: 4
Gerrit-Owner: Keith Randall <k...@golang.org>
Gerrit-Reviewer: David Chase <drc...@google.com>
Gerrit-Reviewer: Keith Randall <k...@golang.org>
Gerrit-Reviewer: Keith Randall <k...@google.com>
open
diffy
satisfied_requirement

Carlos Amedee (Gerrit)

unread,
Oct 1, 2025, 2:40:45 PM (14 hours ago) Oct 1
to Keith Randall, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, David Chase, Keith Randall, Go LUCI, golang-co...@googlegroups.com

Carlos Amedee submitted the change

Change information

Commit message:
[release-branch.go1.24] cmd/compile: don't rely on loop info when there are irreducible loops


Loop information is sketchy when there are irreducible loops.
Sometimes blocks inside 2 loops can be recorded as only being part of
the outer loop. That causes tighten to move values that want to move
into such a block to move out of the loop altogether, breaking the
invariant that operations have to be scheduled after their args.

Fixes #75594


Change-Id: Idd80e6d2268094b8ae6387563081fdc1e211856a
Reviewed-on: https://go-review.googlesource.com/c/go/+/706355
Reviewed-by: David Chase <drc...@google.com>
LUCI-TryBot-Result: Go LUCI <golang...@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <k...@google.com>
(cherry picked from commit f15cd63ec4860c4f2c23cc992843546e0265c332)
Reviewed-on: https://go-review.googlesource.com/c/go/+/706575
Files:
  • M src/cmd/compile/internal/ssa/tighten.go
  • A test/fixedbugs/issue75569.go
Change size: M
Delta: 2 files changed, 92 insertions(+), 12 deletions(-)
Branch: refs/heads/release-branch.go1.24
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Keith Randall, +2 by David Chase
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: release-branch.go1.24
Gerrit-Change-Id: Idd80e6d2268094b8ae6387563081fdc1e211856a
Gerrit-Change-Number: 706575
Gerrit-PatchSet: 2
Gerrit-Owner: Keith Randall <k...@golang.org>
Gerrit-Reviewer: Carlos Amedee <car...@golang.org>
open
diffy
satisfied_requirement

Carlos Amedee (Gerrit)

unread,
Oct 1, 2025, 2:40:50 PM (14 hours ago) Oct 1
to Keith Randall, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, David Chase, Keith Randall, Go LUCI, golang-co...@googlegroups.com

Carlos Amedee submitted the change

Change information

Commit message:
[release-branch.go1.25] cmd/compile: don't rely on loop info when there are irreducible loops


Loop information is sketchy when there are irreducible loops.
Sometimes blocks inside 2 loops can be recorded as only being part of
the outer loop. That causes tighten to move values that want to move
into such a block to move out of the loop altogether, breaking the
invariant that operations have to be scheduled after their args.

Fixes #75595


Change-Id: Idd80e6d2268094b8ae6387563081fdc1e211856a
Reviewed-on: https://go-review.googlesource.com/c/go/+/706355
Reviewed-by: David Chase <drc...@google.com>
LUCI-TryBot-Result: Go LUCI <golang...@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <k...@google.com>
(cherry picked from commit f15cd63ec4860c4f2c23cc992843546e0265c332)
Files:
  • M src/cmd/compile/internal/ssa/tighten.go
  • A test/fixedbugs/issue75569.go
Change size: M
Delta: 2 files changed, 92 insertions(+), 12 deletions(-)
Branch: refs/heads/release-branch.go1.25
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Keith Randall, +2 by David Chase
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: release-branch.go1.25
Gerrit-Change-Id: Idd80e6d2268094b8ae6387563081fdc1e211856a
Gerrit-Change-Number: 706576
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages