]> Cypherpunks repositories - gostls13.git/commit
[dev.ssa] cmd/compile: don't issue nops for static data
authorKeith Randall <khr@golang.org>
Tue, 20 Oct 2015 20:56:16 +0000 (13:56 -0700)
committerKeith Randall <khr@golang.org>
Tue, 20 Oct 2015 21:59:01 +0000 (21:59 +0000)
commitfbfc18c52281a4ac6dd812274e9a3b4774f77f76
tree0dd8bbe032997e4f12338ab8841c26d60e9a480b
parent97728b6575624ba5f1d0c060930fc07aad2b5517
[dev.ssa] cmd/compile: don't issue nops for static data

It confuses live variable analysis to have a bunch of unreachable
no-ops at the end of a function.  Symptom is:
    gc/plive.go:483 panic: interface conversion: interface {} is nil, not *gc.BasicBlock

I don't see any reason why the old compiler needs these no-ops either.
all.bash passes with the equivalent code removed on master.

Change-Id: Ifcd2c3e139aa16314f08aebc9079b2fb7aa60556
Reviewed-on: https://go-review.googlesource.com/16132
Reviewed-by: David Chase <drchase@google.com>
src/cmd/compile/internal/gc/sinit.go