summaryrefslogtreecommitdiff
path: root/gcc/go/Make-lang.in
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2015-04-17 17:10:12 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2015-04-17 17:10:12 +0000
commitda244e597db59cc4fa58a8427ab1027dca2bbf45 (patch)
treed1dced696fcc3d7e6802d825c7ddf09b50b62bda /gcc/go/Make-lang.in
parent868af6b6b6980d2e7008d2c6676e02166b275763 (diff)
downloadgcc-da244e597db59cc4fa58a8427ab1027dca2bbf45.tar.gz
compiler: Escape analysis.
By Chris Manghane. Comprises three changes to gofrontend repository: compiler: Add escape information to export data. compiler: Stack-allocate non-escaping variables. This change allows variables initialized through make or new to be allocated on the stack via a temporary variable if they do not escape their function. It also improves the analysis to consider situations where variables escape in the standard library and go testsuite such as: *nested composite literals and composite literal arguments *method receivers always escaping *escape via statements in closures referring to enclosing variables *escape via calls with multiple return results compiler: Basic escape analysis for the go frontend. This is an implementation of the algorithm described in "Escape Analysis in Java" by Choi et. al. It relies on dataflow information to discover variable references to one another. Handles assignments to closures and association between closures variables and the variables of the enclosing scope. Dataflow analysis does not discover references through range statements e.g. for _, v := range a will not recognize that all values of v are references to a. * Make-lang.in (GO_OBJS): Add go/escape.o. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222188 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/go/Make-lang.in')
-rw-r--r--gcc/go/Make-lang.in1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/go/Make-lang.in b/gcc/go/Make-lang.in
index 6c5968a13f7..34470875cfd 100644
--- a/gcc/go/Make-lang.in
+++ b/gcc/go/Make-lang.in
@@ -51,6 +51,7 @@ go-warn = $(STRICT_WARN)
GO_OBJS = \
go/ast-dump.o \
go/dataflow.o \
+ go/escape.o \
go/export.o \
go/expressions.o \
go/go-backend.o \