From: Heschi Kreinick Date: Wed, 28 Feb 2018 22:53:31 +0000 (-0500) Subject: cmd/compile/internal/ssa: batch up all zero-width instructions X-Git-Tag: go1.11beta1~1375 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=9dc351beba464aa47048547e60ca4866e345d482;p=gostls13.git cmd/compile/internal/ssa: batch up all zero-width instructions When generating location lists, batch up changes for all zero-width instructions, not just phis. This prevents the creation of location list entries that don't actually cover any instructions. This isn't perfect because of the caveats in the prior CL (Copy is zero-width sometimes) but in practice this seems to fix all of the empty lists in std. Change-Id: Ice4a9ade36b6b24ca111d1494c414eec96e5af25 Reviewed-on: https://go-review.googlesource.com/97958 Run-TryBot: Heschi Kreinick TryBot-Result: Gobot Gobot Reviewed-by: David Chase --- diff --git a/src/cmd/compile/internal/ssa/debug.go b/src/cmd/compile/internal/ssa/debug.go index 9750c4d017..3924f9341a 100644 --- a/src/cmd/compile/internal/ssa/debug.go +++ b/src/cmd/compile/internal/ssa/debug.go @@ -790,24 +790,24 @@ func (state *debugState) buildLocationLists(blockLocs []*BlockDebug) { state.mergePredecessors(b, blockLocs) - phisPending := false + zeroWidthPending := false for _, v := range b.Values { slots := state.valueNames[v.ID] reg, _ := state.f.getHome(v.ID).(*Register) changed := state.processValue(v, slots, reg) - if v.Op == OpPhi { + if opcodeTable[v.Op].zeroWidth { if changed { - phisPending = true + zeroWidthPending = true } continue } - if !changed && !phisPending { + if !changed && !zeroWidthPending { continue } - phisPending = false + zeroWidthPending = false for _, varID := range state.changedVars.contents() { state.updateVar(VarID(varID), v, state.currentState.slots) }