diff options
author | Michael Matz <matz@suse.de> | 2012-05-29 14:44:47 +0000 |
---|---|---|
committer | Michael Matz <matz@gcc.gnu.org> | 2012-05-29 14:44:47 +0000 |
commit | 9474e8ab4a4f8b22a4411a0688cea4c870378425 (patch) | |
tree | 9cac16ca3b03c2c66c24eeab8ec66e412d413342 /gcc/expr.c | |
parent | ca5f4331230013bba0a5e4d1c4340158b2991b65 (diff) | |
download | gcc-9474e8ab4a4f8b22a4411a0688cea4c870378425.zip gcc-9474e8ab4a4f8b22a4411a0688cea4c870378425.tar.gz gcc-9474e8ab4a4f8b22a4411a0688cea4c870378425.tar.bz2 |
rtl.h (assign_stack_temp, [...]): Remove 'keep' argument.
* 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.
From-SVN: r187965
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 75 |
1 files changed, 22 insertions, 53 deletions
@@ -1615,7 +1615,7 @@ emit_group_load_1 (rtx *tmps, rtx dst, rtx orig_src, tree type, int ssize) { enum machine_mode imode = int_mode_for_mode (GET_MODE (orig_src)); if (imode == BLKmode) - src = assign_stack_temp (GET_MODE (orig_src), ssize, 0); + src = assign_stack_temp (GET_MODE (orig_src), ssize); else src = gen_reg_rtx (imode); if (imode != BLKmode) @@ -1717,7 +1717,7 @@ emit_group_load_1 (rtx *tmps, rtx dst, rtx orig_src, tree type, int ssize) rtx mem; gcc_assert (!bytepos); - mem = assign_stack_temp (GET_MODE (src), slen, 0); + mem = assign_stack_temp (GET_MODE (src), slen); emit_move_insn (mem, src); tmps[i] = extract_bit_field (mem, bytelen * BITS_PER_UNIT, 0, 1, false, NULL_RTX, mode, mode); @@ -1732,7 +1732,7 @@ emit_group_load_1 (rtx *tmps, rtx dst, rtx orig_src, tree type, int ssize) int slen = GET_MODE_SIZE (GET_MODE (src)); rtx mem; - mem = assign_stack_temp (GET_MODE (src), slen, 0); + mem = assign_stack_temp (GET_MODE (src), slen); emit_move_insn (mem, src); tmps[i] = adjust_address (mem, mode, (int) bytepos); } @@ -1883,7 +1883,7 @@ emit_group_store (rtx orig_dst, rtx src, tree type ATTRIBUTE_UNUSED, int ssize) { enum machine_mode imode = int_mode_for_mode (GET_MODE (orig_dst)); if (imode == BLKmode) - dst = assign_stack_temp (GET_MODE (orig_dst), ssize, 0); + dst = assign_stack_temp (GET_MODE (orig_dst), ssize); else dst = gen_reg_rtx (imode); emit_group_store (dst, src, type, ssize); @@ -1933,7 +1933,7 @@ emit_group_store (rtx orig_dst, rtx src, tree type ATTRIBUTE_UNUSED, int ssize) it. Allocate a temporary, and split this into a store/load to/from the temporary. */ - temp = assign_stack_temp (GET_MODE (dst), ssize, 0); + temp = assign_stack_temp (GET_MODE (dst), ssize); emit_group_store (temp, src, type, ssize); emit_group_load (dst, temp, type, ssize); return; @@ -2028,8 +2028,7 @@ emit_group_store (rtx orig_dst, rtx src, tree type ATTRIBUTE_UNUSED, int ssize) >= GET_MODE_ALIGNMENT (tmp_mode)) { dest = assign_stack_temp (dest_mode, - GET_MODE_SIZE (dest_mode), - 0); + GET_MODE_SIZE (dest_mode)); emit_move_insn (adjust_address (dest, tmp_mode, bytepos), @@ -2039,8 +2038,7 @@ emit_group_store (rtx orig_dst, rtx src, tree type ATTRIBUTE_UNUSED, int ssize) else { dest = assign_stack_temp (tmp_mode, - GET_MODE_SIZE (tmp_mode), - 0); + GET_MODE_SIZE (tmp_mode)); emit_move_insn (dest, tmps[i]); dst = adjust_address (dest, dest_mode, bytepos); } @@ -2108,7 +2106,7 @@ copy_blkmode_from_reg (rtx tgtblk, rtx srcreg, tree type) tgtblk = assign_temp (build_qualified_type (type, (TYPE_QUALS (type) | TYPE_QUAL_CONST)), - 0, 1, 1); + 1, 1); preserve_temp_slots (tgtblk); } @@ -4030,7 +4028,7 @@ emit_push_insn (rtx x, enum machine_mode mode, tree type, rtx size, size = GEN_INT (GET_MODE_SIZE (mode)); if (!MEM_P (xinner)) { - temp = assign_temp (type, 0, 1, 1); + temp = assign_temp (type, 1, 1); emit_move_insn (temp, xinner); xinner = temp; } @@ -4782,8 +4780,7 @@ expand_assignment (tree to, tree from, bool nontemporal) else { rtx temp = assign_stack_temp (GET_MODE (to_rtx), - GET_MODE_SIZE (GET_MODE (to_rtx)), - 0); + GET_MODE_SIZE (GET_MODE (to_rtx))); write_complex_part (temp, XEXP (to_rtx, 0), false); write_complex_part (temp, XEXP (to_rtx, 1), true); result = store_field (temp, bitsize, bitpos, @@ -4839,7 +4836,6 @@ expand_assignment (tree to, tree from, bool nontemporal) if (result) preserve_temp_slots (result); - free_temp_slots (); pop_temp_slots (); return; } @@ -4887,7 +4883,6 @@ expand_assignment (tree to, tree from, bool nontemporal) emit_move_insn (to_rtx, value); } preserve_temp_slots (to_rtx); - free_temp_slots (); pop_temp_slots (); return; } @@ -4914,7 +4909,6 @@ expand_assignment (tree to, tree from, bool nontemporal) emit_move_insn (to_rtx, temp); preserve_temp_slots (to_rtx); - free_temp_slots (); pop_temp_slots (); return; } @@ -4944,7 +4938,6 @@ expand_assignment (tree to, tree from, bool nontemporal) TYPE_MODE (sizetype)); preserve_temp_slots (to_rtx); - free_temp_slots (); pop_temp_slots (); return; } @@ -4954,7 +4947,6 @@ expand_assignment (tree to, tree from, bool nontemporal) push_temp_slots (); result = store_expr (from, to_rtx, 0, nontemporal); preserve_temp_slots (result); - free_temp_slots (); pop_temp_slots (); return; } @@ -6314,7 +6306,7 @@ store_field (rtx target, HOST_WIDE_INT bitsize, HOST_WIDE_INT bitpos, if (mode == BLKmode && (REG_P (target) || GET_CODE (target) == SUBREG)) { - rtx object = assign_temp (type, 0, 1, 1); + rtx object = assign_temp (type, 1, 1); rtx blk_object = adjust_address (object, BLKmode, 0); if (bitsize != (HOST_WIDE_INT) GET_MODE_BITSIZE (GET_MODE (target))) @@ -7768,7 +7760,7 @@ expand_constructor (tree exp, rtx target, enum expand_modifier modifier, = assign_temp (build_qualified_type (type, (TYPE_QUALS (type) | (TREE_READONLY (exp) * TYPE_QUAL_CONST))), - 0, TREE_ADDRESSABLE (exp), 1); + TREE_ADDRESSABLE (exp), 1); } store_constructor (exp, target, 0, int_expr_size (exp)); @@ -7892,7 +7884,7 @@ expand_cond_expr_using_cmove (tree treeop0 ATTRIBUTE_UNUSED, int unsignedp = TYPE_UNSIGNED (type); enum machine_mode mode = TYPE_MODE (type); - temp = assign_temp (type, 0, 0, 1); + temp = assign_temp (type, 0, 1); /* If we cannot do a conditional move on the mode, try doing it with the promoted mode. */ @@ -8050,7 +8042,7 @@ expand_expr_real_2 (sepops ops, rtx target, enum machine_mode tmode, if (TYPE_MODE (type) != BLKmode) target = gen_reg_rtx (TYPE_MODE (type)); else - target = assign_temp (type, 0, 1, 1); + target = assign_temp (type, 1, 1); } if (MEM_P (target)) @@ -9037,7 +9029,7 @@ expand_expr_real_2 (sepops ops, rtx target, enum machine_mode tmode, && !MEM_P (original_target)) temp = original_target; else - temp = assign_temp (type, 0, 0, 1); + temp = assign_temp (type, 0, 1); do_pending_stack_adjust (); NO_DEFER_POP; @@ -9288,7 +9280,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, /* This is the case of an array whose size is to be determined from its initializer, while the initializer is still being parsed. - See expand_decl. */ + ??? We aren't parsing while expanding anymore. */ if (MEM_P (decl_rtl) && REG_P (XEXP (decl_rtl, 0))) temp = validize_mem (decl_rtl); @@ -9563,8 +9555,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, else { temp = assign_stack_temp (DECL_MODE (base), - GET_MODE_SIZE (DECL_MODE (base)), - 0); + GET_MODE_SIZE (DECL_MODE (base))); store_expr (base, temp, 0, false); temp = adjust_address (temp, BLKmode, offset); set_mem_size (temp, int_size_in_bytes (TREE_TYPE (exp))); @@ -9922,7 +9913,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, tree nt = build_qualified_type (TREE_TYPE (tem), (TYPE_QUALS (TREE_TYPE (tem)) | TYPE_QUAL_CONST)); - memloc = assign_temp (nt, 0, 1, 1); + memloc = assign_temp (nt, 1, 1); emit_move_insn (memloc, op0); op0 = memloc; mem_attrs_from_type = true; @@ -10029,7 +10020,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, if (ext_mode == BLKmode) { if (target == 0) - target = assign_temp (type, 0, 1, 1); + target = assign_temp (type, 1, 1); if (bitsize == 0) return target; @@ -10085,7 +10076,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, new_rtx = assign_stack_temp_for_type (ext_mode, GET_MODE_BITSIZE (ext_mode), - 0, type); + type); emit_move_insn (new_rtx, op0); op0 = copy_rtx (new_rtx); PUT_MODE (op0, BLKmode); @@ -10277,7 +10268,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, target = assign_stack_temp_for_type (TYPE_MODE (inner_type), - GET_MODE_SIZE (TYPE_MODE (inner_type)), 0, inner_type); + GET_MODE_SIZE (TYPE_MODE (inner_type)), inner_type); emit_move_insn (target, op0); op0 = target; @@ -10324,7 +10315,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, = MAX (int_size_in_bytes (inner_type), (HOST_WIDE_INT) GET_MODE_SIZE (mode)); rtx new_rtx - = assign_stack_temp_for_type (mode, temp_size, 0, type); + = assign_stack_temp_for_type (mode, temp_size, type); rtx new_with_op0_mode = adjust_address (new_rtx, GET_MODE (op0), 0); @@ -10440,28 +10431,6 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, return expand_expr_real (treeop0, original_target, tmode, modifier, alt_rtl); -#if 0 - { - /* Initialize the anonymous variable declared in the compound - literal, then return the variable. */ - tree decl = COMPOUND_LITERAL_EXPR_DECL (exp); - - /* Create RTL for this variable. */ - if (!DECL_RTL_SET_P (decl)) - { - if (DECL_HARD_REGISTER (decl)) - /* The user specified an assembler name for this variable. - Set that up now. */ - rest_of_decl_compilation (decl, 0, 0); - else - expand_decl (decl); - } - - return expand_expr_real (decl, original_target, tmode, - modifier, alt_rtl); - } -#endif - default: return expand_expr_real_2 (&ops, target, tmode, modifier); } |