[PATCH] Merge from match-and-simplify, remove fold_unary dispatch from fold_stmt
Richard Biener
richard.guenther@gmail.com
Mon Nov 3 12:58:00 GMT 2014
On Fri, Oct 31, 2014 at 2:07 PM, Richard Biener
<richard.guenther@gmail.com> wrote:
> This implements the last pattern from fold_unary that covers
> inputs that can come from a GIMPLE_UNARY_RHS assignment
> and thus allows removal of the fold_unary dispatch from fold_stmt
> and gimple_fold_stmt_to_constant_1. Remember that to not cause
> regressions it is enough to cover cases that do not need SSA
> name use-def following. Also remember that gimple_simplify
> still dispatches to fold_unary for all tcc_constant operands.
>
> The next goal is obviously to remove the GIMPLE_BINARY_RHS and
> GIMPLE_TERNARY_RHS dispatches to fold_binary/ternary.
>
> Bootstrapped on x86_64-unknown-linux-gnu, testing in progress.
The following is what I applied.
Bootstrapped and tested on x86_64-unknown-linux-gnu.
Richard.
2014-11-03 Richard Biener <rguenther@suse.de>
* match.pd: Add two abs patterns. Announce tree_expr_nonnegative_p.
Also drop bogus FLOAT_EXPR and FIX_TRUNC_EXPR.
* fold-const.c (fold_unary_loc): Remove them here.
(tree_unary_nonnegative_warnv_p): Use CASE_CONVERT.
* gimple-fold.c (fold_gimple_assign): Remove now obsolete
GIMPLE_UNARY_RHS case.
(gimple_fold_stmt_to_constant_1): Likewise.
(replace_stmt_with_simplification): Fix inverted comparison.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mas-merge-10
Type: application/octet-stream
Size: 4308 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20141103/382bd7ad/attachment.obj>
More information about the Gcc-patches
mailing list