The goal here is to make it easier for a human to
examine the SSA when a function contains lots of dead code.
No significant compiler metric or generated code differences.
Change-Id: I81915fa4639bc8820cc9a5e45e526687d0d1f57a
Reviewed-on: https://go-review.googlesource.com/c/go/+/221791
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
s.assign(n.Left, r, deref, skip)
case OIF:
+ if Isconst(n.Left, CTBOOL) {
+ s.stmtList(n.Left.Ninit)
+ if n.Left.Bool() {
+ s.stmtList(n.Nbody)
+ } else {
+ s.stmtList(n.Rlist)
+ }
+ break
+ }
+
bEnd := s.f.NewBlock(ssa.BlockPlain)
var likely int8
if n.Likely() {