[go] cmd/compile: make the cached sdom always return the reverse PO

0 views
Skip to first unread message

Gopher Robot (Gerrit)

unread,
Feb 12, 2026, 12:31:29 PM (18 hours ago) Feb 12
to Daniel Morsing, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Junyang Shao, Go LUCI, Keith Randall, Keith Randall, Martin Möhrmann, golang-co...@googlegroups.com

Gopher Robot submitted the change

Change information

Commit message:
cmd/compile: make the cached sdom always return the reverse PO

The sdom tree has a feature where the ordering of child nodes could be
customized, but in actuality, we only ever used one ordering: reverse
postorder. This order has a nice property that walking the tree will
always visit the source block of any non-retreating edge before the
destination block.

Make this ordering the default and document it. This allows passes that
use it to use the cached sdom tree instead of calculating it from
scratch each time.
Change-Id: I907b8ff7cc722e94bf364c183f26ead66a6a6964
Reviewed-by: Keith Randall <k...@golang.org>
Auto-Submit: Keith Randall <k...@golang.org>
Reviewed-by: Keith Randall <k...@google.com>
Reviewed-by: Junyang Shao <shaoj...@google.com>
Files:
  • M src/cmd/compile/internal/ssa/loopreschedchecks.go
  • M src/cmd/compile/internal/ssa/sparsetree.go
Change size: S
Delta: 2 files changed, 6 insertions(+), 23 deletions(-)
Branch: refs/heads/master
Submit Requirements:
  • requirement satisfiedCode-Review: +2 by Keith Randall, +1 by Keith Randall, +1 by Junyang Shao
  • 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: I907b8ff7cc722e94bf364c183f26ead66a6a6964
Gerrit-Change-Number: 742340
Gerrit-PatchSet: 3
Gerrit-Owner: Daniel Morsing <daniel....@gmail.com>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
Gerrit-Reviewer: Junyang Shao <shaoj...@google.com>
Gerrit-Reviewer: Keith Randall <k...@golang.org>
Gerrit-Reviewer: Keith Randall <k...@google.com>
Gerrit-Reviewer: Martin Möhrmann <moeh...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages