aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCherry Zhang <cherryyz@google.com>2018-06-08 23:55:06 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2018-06-08 23:55:06 +0000
commit88f1232807e44dbf4e74bf7976c424c0c0a5c355 (patch)
treecf9d56e7540e6991c54da6ae576ba22a0fbe6840
parentd1ecece9af3adc46eb1cc716608c38692d57f9c1 (diff)
downloadgcc-88f1232807e44dbf4e74bf7976c424c0c0a5c355.zip
gcc-88f1232807e44dbf4e74bf7976c424c0c0a5c355.tar.gz
gcc-88f1232807e44dbf4e74bf7976c424c0c0a5c355.tar.bz2
compiler: remove stack_allocation_expression
Now we make temporaries for allocations on stack (CL 86242). This function is no longer used. Remove. Reviewed-on: https://go-review.googlesource.com/92618 * go-gcc.cc (class Gcc_backend): Remove stack_allocation_expression method. From-SVN: r261353
-rw-r--r--gcc/go/ChangeLog5
-rw-r--r--gcc/go/go-gcc.cc17
-rw-r--r--gcc/go/gofrontend/backend.h4
3 files changed, 5 insertions, 21 deletions
diff --git a/gcc/go/ChangeLog b/gcc/go/ChangeLog
index b63a969..4e473b6 100644
--- a/gcc/go/ChangeLog
+++ b/gcc/go/ChangeLog
@@ -1,3 +1,8 @@
+2018-06-08 Cherry Zhang <cherryyz@google.com>
+
+ * go-gcc.cc (class Gcc_backend): Remove
+ stack_allocation_expression method.
+
2018-02-03 Ian Lance Taylor <iant@golang.org>
* go-gcc.cc (Gcc_backend::fill_in_struct): Mark struct types as
diff --git a/gcc/go/go-gcc.cc b/gcc/go/go-gcc.cc
index 61e8493..870e865 100644
--- a/gcc/go/go-gcc.cc
+++ b/gcc/go/go-gcc.cc
@@ -352,9 +352,6 @@ class Gcc_backend : public Backend
const std::vector<Bexpression*>& args,
Bexpression* static_chain, Location);
- Bexpression*
- stack_allocation_expression(int64_t size, Location);
-
// Statements.
Bstatement*
@@ -1999,20 +1996,6 @@ Gcc_backend::call_expression(Bfunction*, // containing fcn for call
return this->make_expression(ret);
}
-// Return an expression that allocates SIZE bytes on the stack.
-
-Bexpression*
-Gcc_backend::stack_allocation_expression(int64_t size, Location location)
-{
- tree alloca = builtin_decl_explicit(BUILT_IN_ALLOCA);
- tree size_tree = build_int_cst(integer_type_node, size);
- tree ret = build_call_expr_loc(location.gcc_location(), alloca, 1, size_tree);
- tree memset = builtin_decl_explicit(BUILT_IN_MEMSET);
- ret = build_call_expr_loc(location.gcc_location(), memset, 3,
- ret, integer_zero_node, size_tree);
- return this->make_expression(ret);
-}
-
// An expression as a statement.
Bstatement*
diff --git a/gcc/go/gofrontend/backend.h b/gcc/go/gofrontend/backend.h
index b601105..5cc0dec 100644
--- a/gcc/go/gofrontend/backend.h
+++ b/gcc/go/gofrontend/backend.h
@@ -379,10 +379,6 @@ class Backend
const std::vector<Bexpression*>& args,
Bexpression* static_chain, Location) = 0;
- // Return an expression that allocates SIZE bytes on the stack.
- virtual Bexpression*
- stack_allocation_expression(int64_t size, Location) = 0;
-
// Statements.
// Create an error statement. This is used for cases which should