compiler: disable escape analysis for runtime

Currently the runtime is hard-coded to non-escape in various places.
    Don't run escape analysis for runtime.
    
    Reviewed-on: https://go-review.googlesource.com/76210

From-SVN: r254476
This commit is contained in:
Ian Lance Taylor 2017-11-06 21:00:32 +00:00
parent ce995d1cc2
commit b78e2e5238
2 changed files with 7 additions and 1 deletions

View File

@ -1,4 +1,4 @@
b9885a251ae2c43252926dbe1960df5640aa469b
1427cedcb0faa627fd89a75e009f7898c25aa86c
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.

View File

@ -692,6 +692,12 @@ Gogo::analyze_escape()
if (!optimize_allocation_flag.is_enabled() || saw_errors())
return;
// Currently runtime is hard-coded to non-escape in various places.
// Don't run escape analysis for runtime.
// TODO: remove this once it works for runtime.
if (this->compiling_runtime() && this->package_name() == "runtime")
return;
// Discover strongly connected groups of functions to analyze for escape
// information in this package.
this->discover_analysis_sets();