summaryrefslogtreecommitdiff
path: root/gcc/stmt.c
diff options
context:
space:
mode:
authormatz <matz@138bc75d-0d04-0410-961f-82ee72b054a4>2012-05-29 14:44:47 +0000
committermatz <matz@138bc75d-0d04-0410-961f-82ee72b054a4>2012-05-29 14:44:47 +0000
commit0ab48139f36df798802b0128ce822980bf66be25 (patch)
tree9cac16ca3b03c2c66c24eeab8ec66e412d413342 /gcc/stmt.c
parent7843e4bcb63ff8966e40b3498c00cb4a4c5783e1 (diff)
downloadgcc-0ab48139f36df798802b0128ce822980bf66be25.tar.gz
* rtl.h (assign_stack_temp, assign_stack_temp_for_type,
assign_temp): Remove 'keep' argument. (mark_temp_addr_taken): Remove prototype. * tree.h (expand_decl): Remove prototype. * function.c (struct temp_slot): Remove addr_taken and keep member. (assign_stack_temp_for_type) Don't initialize above, remove keep argument. (assign_stack_temp, assign_temp): Remove keep argument. (mark_temp_addr_taken): Remove. (preserve_temp_slots): Remove handling of addr_taken and keep members. (free_temp_slots): Ditto. * expr.c (expand_expr_real_1 <COMPOUND_LITERAL_EXPR>): Remove dead code. * stmt.c (expand_asm_operands): Remove dead code. (expand_decl): Remove. * c-decl.c (finish_struct): Don't call expand_decl. * builtins.c (expand_builtin_cexpi): Adjust calls to assign_temp and assign_stack_temp. * calls.c (save_fixed_argument_area, initialize_argument_information, expand_call, emit_library_call_value_1, store_one_arg): Ditto. * expmed.c (extract_bit_field_1): Ditto. * expr.c (emit_group_load_1, emit_group_store, copy_blkmode_from_reg, emit_push_insn, expand_assignment, store_field, expand_constructor, expand_cond_expr_using_cmove, expand_expr_real_2, expand_expr_real_1): Ditto. * stmt.c (expand_asm_operands, expand_return): Ditto. * function.c (pop_temp_slots): Call free_temp_slots. * calls.c (store_one_arg): Don't call preserve_temp_slots or free_temp_slots. * expr.c (expand_assignment): Don't call free_temp_slots. * config/arm/arm.c (neon_expand_vector_init): Ditto. * config/i386/i386.c (ix86_expand_vector_set): Ditto. (ix86_expand_vector_extract): Ditto. * config/ia64/ia64.c (spill_xfmode_rfmode_operand, ia64_expand_movxf_movrf): Ditto. * config/mips/mips.c (mips_expand_vi_general): Ditto. * config/mmix/mmix.md (floatdisf2, floatunsdisf2, truncdfsf2, extendsfdf2): Ditto. * config/rs6000/rs6000.c (rs6000_expand_vector_init, rs6000_expand_vector_set, rs6000_expand_vector_extract, rs6000_allocate_stack_temp): Ditto. * config/rs6000/rs6000.md (fix_trunctfsi2_fprs): Ditto. * config/sparc/sparc.c (emit_soft_tfmode_libcall, sparc_emit_float_lib_cmp, sparc_emit_float_lib_cmp, sparc_expand_vector_init): Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187965 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/stmt.c')
-rw-r--r--gcc/stmt.c138
1 files changed, 2 insertions, 136 deletions
diff --git a/gcc/stmt.c b/gcc/stmt.c
index a9258b15c7d..4ad4d0f1e59 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -827,7 +827,7 @@ expand_asm_operands (tree string, tree outputs, tree inputs,
}
else
{
- op = assign_temp (type, 0, 0, 1);
+ op = assign_temp (type, 0, 1);
op = validize_mem (op);
if (!MEM_P (op) && TREE_CODE (TREE_VALUE (tail)) == SSA_NAME)
set_reg_attrs_for_decl_rtl (SSA_NAME_VAR (TREE_VALUE (tail)), op);
@@ -911,33 +911,6 @@ expand_asm_operands (tree string, tree outputs, tree inputs,
}
else
gcc_unreachable ();
-#if 0
- {
- warning (0, "use of memory input without lvalue in "
- "asm operand %d is deprecated", i + noutputs);
-
- if (CONSTANT_P (op))
- {
- rtx mem = force_const_mem (TYPE_MODE (type), op);
- if (mem)
- op = validize_mem (mem);
- else
- op = force_reg (TYPE_MODE (type), op);
- }
- if (REG_P (op)
- || GET_CODE (op) == SUBREG
- || GET_CODE (op) == CONCAT)
- {
- tree qual_type = build_qualified_type (type,
- (TYPE_QUALS (type)
- | TYPE_QUAL_CONST));
- rtx memloc = assign_temp (qual_type, 1, 1, 1);
- memloc = validize_mem (memloc);
- emit_move_insn (memloc, op);
- op = memloc;
- }
- }
-#endif
}
generating_concat_p = old_generating_concat_p;
@@ -1606,7 +1579,7 @@ expand_return (tree retval)
tree ot = TREE_TYPE (DECL_RESULT (current_function_decl));
tree nt = build_qualified_type (ot, TYPE_QUALS (ot) | TYPE_QUAL_CONST);
- val = assign_temp (nt, 0, 0, 1);
+ val = assign_temp (nt, 0, 1);
val = expand_expr (retval_rhs, val, GET_MODE (val), EXPAND_NORMAL);
val = force_not_mem (val);
/* Return the calculated value. */
@@ -1692,113 +1665,6 @@ expand_nl_goto_receiver (void)
emit_insn (gen_blockage ());
}
-/* Generate RTL for the automatic variable declaration DECL.
- (Other kinds of declarations are simply ignored if seen here.) */
-
-void
-expand_decl (tree decl)
-{
- tree type;
-
- type = TREE_TYPE (decl);
-
- /* For a CONST_DECL, set mode, alignment, and sizes from those of the
- type in case this node is used in a reference. */
- if (TREE_CODE (decl) == CONST_DECL)
- {
- gcc_unreachable ();
- DECL_MODE (decl) = TYPE_MODE (type);
- DECL_ALIGN (decl) = TYPE_ALIGN (type);
- DECL_SIZE (decl) = TYPE_SIZE (type);
- DECL_SIZE_UNIT (decl) = TYPE_SIZE_UNIT (type);
- return;
- }
-
- /* Otherwise, only automatic variables need any expansion done. Static and
- external variables, and external functions, will be handled by
- `assemble_variable' (called from finish_decl). TYPE_DECL requires
- nothing. PARM_DECLs are handled in `assign_parms'. */
- if (TREE_CODE (decl) != VAR_DECL)
- return;
-
- if (TREE_STATIC (decl) || DECL_EXTERNAL (decl))
- return;
-
- gcc_unreachable ();
- /* Create the RTL representation for the variable. */
-
- if (type == error_mark_node)
- SET_DECL_RTL (decl, gen_rtx_MEM (BLKmode, const0_rtx));
-
- else if (DECL_SIZE (decl) == 0)
- {
- /* Variable with incomplete type. */
- rtx x;
- if (DECL_INITIAL (decl) == 0)
- /* Error message was already done; now avoid a crash. */
- x = gen_rtx_MEM (BLKmode, const0_rtx);
- else
- /* An initializer is going to decide the size of this array.
- Until we know the size, represent its address with a reg. */
- x = gen_rtx_MEM (BLKmode, gen_reg_rtx (Pmode));
-
- set_mem_attributes (x, decl, 1);
- SET_DECL_RTL (decl, x);
- }
- else if (use_register_for_decl (decl))
- {
- /* Automatic variable that can go in a register. */
- enum machine_mode reg_mode = promote_decl_mode (decl, NULL);
-
- SET_DECL_RTL (decl, gen_reg_rtx (reg_mode));
-
- /* Note if the object is a user variable. */
- if (!DECL_ARTIFICIAL (decl))
- mark_user_reg (DECL_RTL (decl));
-
- if (POINTER_TYPE_P (type))
- mark_reg_pointer (DECL_RTL (decl),
- TYPE_ALIGN (TREE_TYPE (TREE_TYPE (decl))));
- }
-
- else
- {
- rtx oldaddr = 0;
- rtx addr;
- rtx x;
-
- /* Variable-sized decls are dealt with in the gimplifier. */
- gcc_assert (TREE_CODE (DECL_SIZE_UNIT (decl)) == INTEGER_CST);
-
- /* If we previously made RTL for this decl, it must be an array
- whose size was determined by the initializer.
- The old address was a register; set that register now
- to the proper address. */
- if (DECL_RTL_SET_P (decl))
- {
- gcc_assert (MEM_P (DECL_RTL (decl)));
- gcc_assert (REG_P (XEXP (DECL_RTL (decl), 0)));
- oldaddr = XEXP (DECL_RTL (decl), 0);
- }
-
- /* Set alignment we actually gave this decl. */
- DECL_ALIGN (decl) = (DECL_MODE (decl) == BLKmode ? BIGGEST_ALIGNMENT
- : GET_MODE_BITSIZE (DECL_MODE (decl)));
- DECL_USER_ALIGN (decl) = 0;
-
- x = assign_temp (decl, 1, 1, 1);
- set_mem_attributes (x, decl, 1);
- SET_DECL_RTL (decl, x);
-
- if (oldaddr)
- {
- addr = force_operand (XEXP (DECL_RTL (decl), 0), oldaddr);
- if (addr != oldaddr)
- emit_move_insn (oldaddr, addr);
- }
- }
-}
-
/* Emit code to save the current value of stack. */
rtx
expand_stack_save (void)