compiler: do simple deadcode elimination
authorIan Lance Taylor <ian@gcc.gnu.org>
Fri, 7 Jun 2019 13:40:26 +0000 (13:40 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Fri, 7 Jun 2019 13:40:26 +0000 (13:40 +0000)
commitab658f56a56ea548b1f293a4a3ada68feb11b417
tree41e7bd6de969ae9edea1bea87de7ab39d4829475
parente733243a3693142bd9c9486451c38d2dc20270ac
compiler: do simple deadcode elimination

    Normally the backend will do deadcode elimination and this is
    sufficient. However, the escape analysis operates on the AST that
    may have deadcode, and may cause things to escape that otherwise
    do not.

    This CL adds a simple deadcode elimination, run before the escape
    analysis.

    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/181080

From-SVN: r272043
gcc/go/gofrontend/MERGE
gcc/go/gofrontend/expressions.cc
gcc/go/gofrontend/expressions.h
gcc/go/gofrontend/go.cc
gcc/go/gofrontend/gogo.cc
gcc/go/gofrontend/gogo.h
gcc/go/gofrontend/statements.h