compiler: remove stack_allocation_expression

Now we make temporaries for allocations on stack (CL 86242). This
function is no longer used. Remove.

Corresponding cleanup in GCC backend:

Index: gcc/go/go-gcc.cc
===================================================================
--- gcc/go/go-gcc.cc	(revision 257456)
+++ gcc/go/go-gcc.cc	(working copy)
@@ -352,9 +352,6 @@
                   const std::vector<Bexpression*>& args,
                   Bexpression* static_chain, Location);

-  Bexpression*
-  stack_allocation_expression(int64_t size, Location);
-
   // Statements.

   Bstatement*
@@ -1999,20 +1996,6 @@
   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*

Change-Id: I50f414c94899487d34d69c7cbb6a1dcc1eaedafc
Reviewed-on: https://go-review.googlesource.com/92618
Reviewed-by: Ian Lance Taylor <iant@golang.org>
1 file changed