diff options
author | Michael Matz <matz@suse.de> | 2009-09-02 21:13:34 +0000 |
---|---|---|
committer | Michael Matz <matz@gcc.gnu.org> | 2009-09-02 21:13:34 +0000 |
commit | 28ed065ef9f3450c5c7f7fe53a3aff66c1721a6d (patch) | |
tree | dcf22487df72f428cf2839f64e5d177bc055f7b3 /gcc/expr.c | |
parent | 2f6924a4846fdb6e9fb51c5fca7d0f7e6336145d (diff) | |
download | gcc-28ed065ef9f3450c5c7f7fe53a3aff66c1721a6d.zip gcc-28ed065ef9f3450c5c7f7fe53a3aff66c1721a6d.tar.gz gcc-28ed065ef9f3450c5c7f7fe53a3aff66c1721a6d.tar.bz2 |
expr.h (emit_storent_insn, [...]): Declare.
* expr.h (emit_storent_insn, expand_expr_real_1,
expand_expr_real_2): Declare.
* expr.c (emit_storent_insn, expand_expr_real_1,
expand_expr_real_2): Export.
(store_expr): Setting and evaluating dont_return_target is
useless.
(expand_expr_real_1, <case GOTO_EXPR, RETURN_EXPR, SWITCH_EXPR,
LABEL_EXPR and ASM_EXPR>): Move to gcc_unreachable.
* except.c (expand_resx_expr): Rename to ...
(expand_resx_stmt): ... this. Rewrite to take gimple statement.
* except.h (expand_resx_stmt): Declare.
* stmt.c: Add include gimple.h
(expand_asm_expr): Rename to ...
(expand_asm_stmt): ... this. Rewrite to take gimple statement.
(expand_case): Rewrite to take gimple statement.
* tree.h (expand_asm_stmt): Declare.
(expand_case): Change prototype.
* Makefile.in (stmt.o): Depend on gimple.h.
* builtins.c (expand_builtin_synchronize): Build gimple asm
statement, not an ASM_EXPR.
* cfgexpand.c (gimple_cond_pred_to_tree, set_expr_location_r,
gimple_to_tree, release_stmt_tree): Remove.
(expand_gimple_cond): Don't call gimple_cond_pred_to_tree or
ggc_free, but hold comparison code and operands separately.
Call jumpif_1 and jumpifnot_1 instead of jumpif and jumpifnot.
(expand_call_stmt, expand_gimple_stmt_1,
expand_gimple_stmt): New helpers.
(expand_gimple_tailcall): Don't call gimple_to_tree, expand_expr_stmt,
release_stmt_tree. Call expand_gimple_stmt instead.
(expand_gimple_basic_block): Ditto.
* calls.c (emit_call_1): Don't look at EH regions here, make
fntree parameter useless.
(expand_call): New local rettype for TREE_TYPE(exp), use it
throughout. Remove local p, use addr instead.
Don't look at EH regions here.
From-SVN: r151350
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 67 |
1 files changed, 11 insertions, 56 deletions
@@ -4435,7 +4435,7 @@ expand_assignment (tree to, tree from, bool nontemporal) /* Emits nontemporal store insn that moves FROM to TO. Returns true if this succeeded, false otherwise. */ -static bool +bool emit_storent_insn (rtx to, rtx from) { enum machine_mode mode = GET_MODE (to), imode; @@ -4485,7 +4485,6 @@ store_expr (tree exp, rtx target, int call_param_p, bool nontemporal) { rtx temp; rtx alt_rtl = NULL_RTX; - int dont_return_target = 0; location_t loc = EXPR_LOCATION (exp); if (VOID_TYPE_P (TREE_TYPE (exp))) @@ -4646,19 +4645,6 @@ store_expr (tree exp, rtx target, int call_param_p, bool nontemporal) (call_param_p ? EXPAND_STACK_PARM : EXPAND_NORMAL), &alt_rtl); - /* Return TARGET if it's a specified hardware register. - If TARGET is a volatile mem ref, either return TARGET - or return a reg copied *from* TARGET; ANSI requires this. - - Otherwise, if TEMP is not TARGET, return TEMP - if it is constant (for efficiency), - or if we really want the correct value. */ - if (!(target && REG_P (target) - && REGNO (target) < FIRST_PSEUDO_REGISTER) - && !(MEM_P (target) && MEM_VOLATILE_P (target)) - && ! rtx_equal_p (temp, target) - && CONSTANT_P (temp)) - dont_return_target = 1; } /* If TEMP is a VOIDmode constant and the mode of the type of EXP is not @@ -4707,15 +4693,7 @@ store_expr (tree exp, rtx target, int call_param_p, bool nontemporal) && GET_MODE (temp) != VOIDmode) { int unsignedp = TYPE_UNSIGNED (TREE_TYPE (exp)); - if (dont_return_target) - { - /* In this case, we will return TEMP, - so make sure it has the proper mode. - But don't forget to store the value into TARGET. */ - temp = convert_to_mode (GET_MODE (target), temp, unsignedp); - emit_move_insn (target, temp); - } - else if (GET_MODE (target) == BLKmode + if (GET_MODE (target) == BLKmode || GET_MODE (temp) == BLKmode) emit_block_move (target, temp, expr_size (exp), (call_param_p @@ -7128,9 +7106,6 @@ expand_constructor (tree exp, rtx target, enum expand_modifier modifier, COMPOUND_EXPR whose second argument is such a VAR_DECL, and so on recursively. */ -static rtx expand_expr_real_1 (tree, rtx, enum machine_mode, - enum expand_modifier, rtx *); - rtx expand_expr_real (tree exp, rtx target, enum machine_mode tmode, enum expand_modifier modifier, rtx *alt_rtl) @@ -7203,7 +7178,7 @@ expand_expr_real (tree exp, rtx target, enum machine_mode tmode, return ret; } -static rtx +rtx expand_expr_real_2 (sepops ops, rtx target, enum machine_mode tmode, enum expand_modifier modifier) { @@ -8251,7 +8226,7 @@ expand_expr_real_2 (sepops ops, rtx target, enum machine_mode tmode, } #undef REDUCE_BIT_FIELD -static rtx +rtx expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, enum expand_modifier modifier, rtx *alt_rtl) { @@ -8611,12 +8586,6 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, return ret; } - case GOTO_EXPR: - if (TREE_CODE (treeop0) == LABEL_DECL) - expand_goto (treeop0); - else - expand_computed_goto (treeop0); - return const0_rtx; case CONSTRUCTOR: /* If we don't need the result, just ensure we evaluate any @@ -9505,13 +9474,6 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, return const0_rtx; } - case RETURN_EXPR: - if (!treeop0) - expand_null_return (); - else - expand_return (treeop0); - return const0_rtx; - case ADDR_EXPR: return expand_expr_addr_expr (exp, target, tmode, modifier); @@ -9523,9 +9485,14 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, op0 = expand_normal (treeop0); return read_complex_part (op0, true); + case RETURN_EXPR: + case LABEL_EXPR: + case GOTO_EXPR: + case SWITCH_EXPR: + case ASM_EXPR: case RESX_EXPR: - expand_resx_expr (exp); - return const0_rtx; + /* Expanded in cfgexpand.c. */ + gcc_unreachable (); case TRY_CATCH_EXPR: case CATCH_EXPR: @@ -9563,18 +9530,6 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, initialization constants, and should not be expanded. */ gcc_unreachable (); - case SWITCH_EXPR: - expand_case (exp); - return const0_rtx; - - case LABEL_EXPR: - expand_label (treeop0); - return const0_rtx; - - case ASM_EXPR: - expand_asm_expr (exp); - return const0_rtx; - case WITH_SIZE_EXPR: /* WITH_SIZE_EXPR expands to its first argument. The caller should have pulled out the size to use in whatever context it needed. */ |