Repository: go
Issue: cmd/compile: elimination of unused runtime calls
Labels: Performance,binary-size,compiler/runtime

Please answer these questions before submitting your issue. Thanks!
### What version of Go are you using (`go version`)?

`go version go1.7.1 windows/amd64`
### What operating system and processor architecture are you using (`go env`)?

```
set GOARCH=amd64
set GOBIN=
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\Dmitriy\Coding\Go\
set GORACE=
set GOROOT=C:\Dmitriy\Go
set GOTOOLDIR=C:\Dmitriy\Go\pkg\tool\windows_amd64
set CC=gcc
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0
set CXX=g++
set CGO_ENABLED=1
```
### What did you do?

Compiled simple program with two unused parameters of type `interface{}` and empty body.
https://play.golang.org/p/TkLKdhLcXo
### What did you expect to see?

Dead code elimination removing the call to `empty` and any unnecessary conversions.
### What did you see instead?

The call to `empty` was removed, but conversions are left around:

```
TEXT main.main(SB) C:/Dmitriy/Coding/Go/src/github.com/DmitriyMV/ssa_test/main.go
    main.go:5   0x401040    65488b0c2528000000  GS MOVQ GS:0x28, CX
    main.go:5   0x401049    488b8900000000      MOVQ 0(CX), CX
    main.go:5   0x401050    483b6110        CMPQ 0x10(CX), SP
    main.go:5   0x401054    0f86c1000000        JBE 0x40111b
    main.go:5   0x40105a    4881ec80000000      SUBQ $0x80, SP
    main.go:5   0x401061    48896c2478      MOVQ BP, 0x78(SP)
    main.go:5   0x401066    488d6c2478      LEAQ 0x78(SP), BP
    main.go:6   0x40106b    48c74424300a000000  MOVQ $0xa, 0x30(SP)
    main.go:6   0x401074    488d1d97750900      LEAQ 0x97597(IP), BX
    main.go:6   0x40107b    48895c2468      MOVQ BX, 0x68(SP)
    main.go:6   0x401080    48c744247005000000  MOVQ $0x5, 0x70(SP)
    main.go:6   0x401089    48c744242800000000  MOVQ $0x0, 0x28(SP)
    main.go:6   0x401092    488d1de7e10700      LEAQ 0x7e1e7(IP), BX
    main.go:6   0x401099    48891c24        MOVQ BX, 0(SP)
    main.go:6   0x40109d    488d5c2430      LEAQ 0x30(SP), BX
    main.go:6   0x4010a2    48895c2408      MOVQ BX, 0x8(SP)
    main.go:6   0x4010a7    488d5c2428      LEAQ 0x28(SP), BX
    main.go:6   0x4010ac    48895c2410      MOVQ BX, 0x10(SP)
    main.go:6   0x4010b1    e86a930000      CALL runtime.convT2E(SB)
    main.go:6   0x4010b6    488b5c2418      MOVQ 0x18(SP), BX
    main.go:6   0x4010bb    48895c2458      MOVQ BX, 0x58(SP)
    main.go:6   0x4010c0    488b5c2420      MOVQ 0x20(SP), BX
    main.go:6   0x4010c5    48895c2460      MOVQ BX, 0x60(SP)
    main.go:6   0x4010ca    31db            XORL BX, BX
    main.go:6   0x4010cc    48895c2438      MOVQ BX, 0x38(SP)
    main.go:6   0x4010d1    48895c2440      MOVQ BX, 0x40(SP)
    main.go:6   0x4010d6    488d1d63e60700      LEAQ 0x7e663(IP), BX
    main.go:6   0x4010dd    48891c24        MOVQ BX, 0(SP)
    main.go:6   0x4010e1    488d5c2468      LEAQ 0x68(SP), BX
    main.go:6   0x4010e6    48895c2408      MOVQ BX, 0x8(SP)
    main.go:6   0x4010eb    488d5c2438      LEAQ 0x38(SP), BX
    main.go:6   0x4010f0    48895c2410      MOVQ BX, 0x10(SP)
    main.go:6   0x4010f5    e826930000      CALL runtime.convT2E(SB)
    main.go:6   0x4010fa    488b5c2418      MOVQ 0x18(SP), BX
    main.go:6   0x4010ff    48895c2448      MOVQ BX, 0x48(SP)
    main.go:6   0x401104    488b5c2420      MOVQ 0x20(SP), BX
    main.go:6   0x401109    48895c2450      MOVQ BX, 0x50(SP)
    main.go:7   0x40110e    488b6c2478      MOVQ 0x78(SP), BP
    main.go:7   0x401113    4881c480000000      ADDQ $0x80, SP
    main.go:7   0x40111a    c3          RET
    main.go:5   0x40111b    e890d10400      CALL runtime.morestack_noctxt(SB)
    main.go:5   0x401120    e91bffffff      JMP main.main(SB)
```

Same thing happen with parameters of map[type]type. With parameter of `...interface{}` the `empty` function itself doesn't get optimized away.

While it's not a bug, it can be a handy feature for debug prints that get optimized away if build tag doesn't present.