]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.ssa] cmd/compile: with -N, don't put JMPs after calls
authorKeith Randall <khr@golang.org>
Sat, 27 Feb 2016 00:32:01 +0000 (16:32 -0800)
committerKeith Randall <khr@golang.org>
Sat, 27 Feb 2016 02:42:19 +0000 (02:42 +0000)
plive doesn't like the fact that we put JMPs right
after CALL ops to select{send,recv}.

Fixes SSA -N build.

Change-Id: I9b3c9e5293196094fd5a6206dd2f99784951f7a9
Reviewed-on: https://go-review.googlesource.com/19982
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
src/cmd/compile/internal/gc/ssa.go

index a64bdd07bd770ece768b361c88b6713d883be8e3..98478061108a9a91468bb0c63200c5365ea4508f 100644 (file)
@@ -3597,10 +3597,11 @@ func genssa(f *ssa.Func, ptxt *obj.Prog, gcargs, gclocals *Sym) {
                }
                // Emit control flow instructions for block
                var next *ssa.Block
-               if i < len(f.Blocks)-1 && Debug['N'] == 0 {
+               if i < len(f.Blocks)-1 && (Debug['N'] == 0 || b.Kind == ssa.BlockCall) {
                        // If -N, leave next==nil so every block with successors
-                       // ends in a JMP.  Helps keep line numbers for otherwise
-                       // empty blocks.
+                       // ends in a JMP (except call blocks - plive doesn't like
+                       // select{send,recv} followed by a JMP call).  Helps keep
+                       // line numbers for otherwise empty blocks.
                        next = f.Blocks[i+1]
                }
                x := Pc