compiler: enable escape analysis for runtime

Programming / Compilers / GCC - ian [138bc75d-0d04-0410-961f-82ee72b054a4] - 17 January 2018 21:24 EST

The runtime package was hard-coded non-escape, and the escape analysis was not run for the runtime package. This CL removes the hard-code, and lets the escape analysis decide. It is not allowed for local variables and closures in the runtime to be heap allocated. This CL adds the check that make sure that they indeed do not escape.

The escape analysis is always run when compiling the runtime now.

Fixes golang/go#17431

Reviewed-on: https://go-review.googlesource.com/86246

c1177ba4678 compiler: enable escape analysis for runtime
gcc/go/gofrontend/MERGE | 2 +-
gcc/go/gofrontend/escape.cc | 79 ++++++++++++++++++++++++----------------
gcc/go/gofrontend/expressions.cc | 41 ++++-----------------
gcc/go/gofrontend/parse.cc | 15 --------
gcc/go/gofrontend/wb.cc | 65 +++++++++++++++++++++++++++++----
5 files changed, 114 insertions(+), 88 deletions(-)

Upstream: gcc.gnu.org


  • Share