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/var-tracking.c | |
parent | 6a1868c766cec7ccaa1073f1b9d0ff30da8169d3 (diff) | |
download | gcc-3af4ba41cc98aa2c50c2a5c3ebcb7197b736994a.tar.gz |
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/var-tracking.c')
-rw-r--r-- | gcc/var-tracking.c | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c index acc4d13d717..cfcc839b96c 100644 --- a/gcc/var-tracking.c +++ b/gcc/var-tracking.c @@ -6246,24 +6246,6 @@ delete_variable_part (dataflow_set *set, rtx loc, decl_or_value dv, slot = delete_slot_part (set, loc, slot, offset); } -/* Wrap result in CONST:MODE if needed to preserve the mode. */ - -static rtx -check_wrap_constant (enum machine_mode mode, rtx result) -{ - if (!result || GET_MODE (result) == mode) - return result; - - if (dump_file && (dump_flags & TDF_DETAILS)) - fprintf (dump_file, " wrapping result in const to preserve mode %s\n", - GET_MODE_NAME (mode)); - - result = wrap_constant (mode, result); - gcc_assert (GET_MODE (result) == mode); - - return result; -} - /* Callback for cselib_expand_value, that looks for expressions holding the value in the var-tracking hash tables. Return X for standard processing, anything else is to be used as-is. */ @@ -6337,7 +6319,6 @@ vt_expand_loc_callback (rtx x, bitmap regs, int max_depth, void *data) { result = cselib_expand_value_rtx_cb (loc->loc, regs, max_depth, vt_expand_loc_callback, vars); - result = check_wrap_constant (GET_MODE (loc->loc), result); if (result) break; } @@ -6355,14 +6336,11 @@ vt_expand_loc_callback (rtx x, bitmap regs, int max_depth, void *data) static rtx vt_expand_loc (rtx loc, htab_t vars) { - rtx newloc; - if (!MAY_HAVE_DEBUG_INSNS) return loc; - newloc = cselib_expand_value_rtx_cb (loc, scratch_regs, 5, - vt_expand_loc_callback, vars); - loc = check_wrap_constant (GET_MODE (loc), newloc); + loc = cselib_expand_value_rtx_cb (loc, scratch_regs, 5, + vt_expand_loc_callback, vars); if (loc && MEM_P (loc)) loc = targetm.delegitimize_address (loc); |