diff options
author | Richard Biener <rguenther@suse.de> | 2015-04-21 12:52:43 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2015-04-21 12:52:43 +0000 |
commit | 0ff093d85530159d74f77edc0da5d8bd176fe953 (patch) | |
tree | 2360651c91e90b4d553f511d0ad13639ea0d08ca /gcc/gimple-match.h | |
parent | 9588d24871d34967389a1396e3df16c61eacd54c (diff) | |
download | gcc-0ff093d85530159d74f77edc0da5d8bd176fe953.zip gcc-0ff093d85530159d74f77edc0da5d8bd176fe953.tar.gz gcc-0ff093d85530159d74f77edc0da5d8bd176fe953.tar.bz2 |
re PR tree-optimization/65650 (CCP does not propgate copies)
2015-04-21 Richard Biener <rguenther@suse.de>
PR tree-optimization/65650
* tree-ssa-ccp.c (valid_lattice_transition): Allow lattice
transitions involving copies.
(set_lattice_value): Adjust for copy lattice state.
(ccp_lattice_meet): Do not merge UNDEFINED and a copy to the copy
if that doesn't dominate the merge point.
(bit_value_unop): Adjust what we treat as varying mask.
(bit_value_binop): Likewise.
(bit_value_assume_aligned): Likewise.
(evaluate_stmt): When we simplified to a SSA name record a copy
instead of dropping to varying.
(visit_assignment): Simplify.
* gimple-match.h (gimple_simplify): Add another callback.
* gimple-fold.c (fold_stmt_1): Adjust caller.
(gimple_fold_stmt_to_constant_1): Likewise - pass valueize
for the 2nd callback.
* gimple-match-head.c (gimple_simplify): Add a callback that is
used to valueize the stmt operands and use it that way.
* gcc.dg/tree-ssa/ssa-ccp-37.c: New testcase.
* gcc.dg/tree-ssa/forwprop-11.c: Adjust.
* gcc.dg/tree-ssa/ssa-fre-3.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-4.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-5.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-32.c: Likewise.
From-SVN: r222267
Diffstat (limited to 'gcc/gimple-match.h')
-rw-r--r-- | gcc/gimple-match.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/gimple-match.h b/gcc/gimple-match.h index 47ee2cc..f9e3517 100644 --- a/gcc/gimple-match.h +++ b/gcc/gimple-match.h @@ -41,7 +41,7 @@ private: }; bool gimple_simplify (gimple, code_helper *, tree *, gimple_seq *, - tree (*)(tree)); + tree (*)(tree), tree (*)(tree)); tree maybe_push_res_to_seq (code_helper, tree, tree *, gimple_seq *, tree res = NULL_TREE); void maybe_build_generic_op (enum tree_code, tree, tree *, tree, tree); |