diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2017-11-06 21:00:32 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2017-11-06 21:00:32 +0000 |
commit | b78e2e523861079fa0fddee0c94af27e2dd27425 (patch) | |
tree | 8c880f487481702e3a196fbc5fd2ac89c48a5e32 | |
parent | ce995d1cc294c195c5a58061369ffdd4e2f4dea0 (diff) | |
download | gcc-b78e2e523861079fa0fddee0c94af27e2dd27425.zip gcc-b78e2e523861079fa0fddee0c94af27e2dd27425.tar.gz gcc-b78e2e523861079fa0fddee0c94af27e2dd27425.tar.bz2 |
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
-rw-r--r-- | gcc/go/gofrontend/MERGE | 2 | ||||
-rw-r--r-- | gcc/go/gofrontend/escape.cc | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 9168d1f..79ad326 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -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. diff --git a/gcc/go/gofrontend/escape.cc b/gcc/go/gofrontend/escape.cc index dea2118..bae8c92 100644 --- a/gcc/go/gofrontend/escape.cc +++ b/gcc/go/gofrontend/escape.cc @@ -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(); |