From b78e2e523861079fa0fddee0c94af27e2dd27425 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Mon, 6 Nov 2017 21:00:32 +0000 Subject: [PATCH] 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 --- gcc/go/gofrontend/MERGE | 2 +- gcc/go/gofrontend/escape.cc | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 9168d1fd5b6..79ad326e2c4 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 dea21188c92..bae8c924b85 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(); -- 2.30.2