diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2009-10-20 19:50:38 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2009-10-20 19:50:38 +0000 |
commit | 3af4ba41cc98aa2c50c2a5c3ebcb7197b736994a (patch) | |
tree | d2712a2600e01b99ea494a11870796fdeedfb4c6 /gcc/cfgexpand.c | |
parent | 6a1868c766cec7ccaa1073f1b9d0ff30da8169d3 (diff) | |
download | gcc-3af4ba41cc98aa2c50c2a5c3ebcb7197b736994a.zip gcc-3af4ba41cc98aa2c50c2a5c3ebcb7197b736994a.tar.gz gcc-3af4ba41cc98aa2c50c2a5c3ebcb7197b736994a.tar.bz2 |
rtl.h (simplify_replace_fn_rtx): Declare.
gcc/
* rtl.h (simplify_replace_fn_rtx): Declare.
(wrap_constant, unwrap_constant): Delete.
* cfgexpand.c (unwrap_constant, wrap_constant): Delete.
(expand_debug_expr): Don't call wrap_constant.
* combine.c (rtx_subst_pair): Only define for AUTO_INC_DEC.
(auto_adjust_pair): Fold into...
(propagate_for_debug_subst): ...here. Only define for AUTO_INC_DEC.
Just return a new value.
(propagate_for_debug): Use simplify_replace_fn_rtx for AUTO_INC_DEC,
otherwise use simplify_replace_rtx.
* cselib.c (wrap_constant): Reinstate old definition.
(cselib_expand_value_rtx_1): Don't wrap constants.
* gcse.c (try_replace_reg): Don't use copy_rtx in the call to
simplify_replace_rtx.
(bypass_block): Fix formatting in calls to simplify_replace_rtx.
* reload1.c (reload): Skip all uses for an insn before adjusting it.
Use simplify_replace_rtx.
* simplify-rtx.c (simplify_replace_fn_rtx): New function,
adapted from...
(simplify_replace_rtx): ...here. Turn into a wrapper for
simplify_replace_fn_rtx.
(simplify_unary_operation): Don't unwrap CONSTs.
* var-tracking.c (check_wrap_constant): Delete.
(vt_expand_loc_callback): Don't call it.
(vt_expand_loc): Likewise.
From-SVN: r153037
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r-- | gcc/cfgexpand.c | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index 8c7c881..2678d7e 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -2194,46 +2194,6 @@ round_udiv_adjust (enum machine_mode mode, rtx mod, rtx op1) const1_rtx, const0_rtx); } -/* Wrap modeless constants in CONST:MODE. */ -rtx -wrap_constant (enum machine_mode mode, rtx x) -{ - if (GET_MODE (x) != VOIDmode) - return x; - - if (CONST_INT_P (x) - || GET_CODE (x) == CONST_FIXED - || GET_CODE (x) == CONST_DOUBLE - || GET_CODE (x) == LABEL_REF) - { - gcc_assert (mode != VOIDmode); - - x = gen_rtx_CONST (mode, x); - } - - return x; -} - -/* Remove CONST wrapper added by wrap_constant(). */ -rtx -unwrap_constant (rtx x) -{ - rtx ret = x; - - if (GET_CODE (x) != CONST) - return x; - - x = XEXP (x, 0); - - if (CONST_INT_P (x) - || GET_CODE (x) == CONST_FIXED - || GET_CODE (x) == CONST_DOUBLE - || GET_CODE (x) == LABEL_REF) - ret = x; - - return ret; -} - /* Convert X to MODE, that must be Pmode or ptr_mode, without emitting any rtl. */ @@ -2356,9 +2316,7 @@ expand_debug_expr (tree exp) case COMPLEX_CST: gcc_assert (COMPLEX_MODE_P (mode)); op0 = expand_debug_expr (TREE_REALPART (exp)); - op0 = wrap_constant (GET_MODE_INNER (mode), op0); op1 = expand_debug_expr (TREE_IMAGPART (exp)); - op1 = wrap_constant (GET_MODE_INNER (mode), op1); return gen_rtx_CONCAT (mode, op0, op1); case DEBUG_EXPR_DECL: |