aboutsummaryrefslogtreecommitdiff
path: root/gcc/go/gofrontend/expressions.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2019-06-05 21:05:38 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2019-06-05 21:05:38 +0000
commit5a9422664e8646313278d50666e2e4c8427cd5df (patch)
treed2b034aeb5116f43b6724b61e017131a3bc64a9c /gcc/go/gofrontend/expressions.h
parent388aa75412ffd1d4cd10dd53d012fdcc1ed47f67 (diff)
downloadgcc-5a9422664e8646313278d50666e2e4c8427cd5df.zip
gcc-5a9422664e8646313278d50666e2e4c8427cd5df.tar.gz
gcc-5a9422664e8646313278d50666e2e4c8427cd5df.tar.bz2
compiler: inline call expressions and function references
Scan inlinable methods for references to global variables and functions (forgot to do that earlier). Track all packages mentioned by exports (that should have been done earlier too). Record assembler name in export data, so that we can inline calls to non-Go functions. Modify gccgoimporter code to skip assembler name. This increases the number of inlinable functions in the standard library from 215 to 439. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/180677 From-SVN: r271976
Diffstat (limited to 'gcc/go/gofrontend/expressions.h')
-rw-r--r--gcc/go/gofrontend/expressions.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/go/gofrontend/expressions.h b/gcc/go/gofrontend/expressions.h
index e17e8dc..fc1c5a8 100644
--- a/gcc/go/gofrontend/expressions.h
+++ b/gcc/go/gofrontend/expressions.h
@@ -1253,6 +1253,9 @@ class Expression
static Expression*
import_identifier(Import_function_body*, Location);
+ static Expression*
+ import_expression_without_suffix(Import_expression*, Location);
+
// The expression classification.
Expression_classification classification_;
// The location in the input file.
@@ -2409,6 +2412,12 @@ class Call_expression : public Expression
virtual Bexpression*
do_get_backend(Translate_context*);
+ int
+ do_inlining_cost() const;
+
+ void
+ do_export(Export_function_body*) const;
+
virtual bool
do_is_recover_call() const;
@@ -2432,6 +2441,9 @@ class Call_expression : public Expression
determining_types();
void
+ export_arguments(Export_function_body*) const;
+
+ void
do_dump_expression(Ast_dump_context*) const;
void
@@ -2571,6 +2583,10 @@ class Builtin_call_expression : public Call_expression
Bexpression*
do_get_backend(Translate_context*);
+ int
+ do_inlining_cost() const
+ { return 1; }
+
void
do_export(Export_function_body*) const;
@@ -2745,6 +2761,12 @@ class Func_expression : public Expression
Bexpression*
do_get_backend(Translate_context*);
+ int
+ do_inlining_cost() const;
+
+ void
+ do_export(Export_function_body*) const;
+
void
do_dump_expression(Ast_dump_context*) const;