diff options
author | Richard Biener <rguenther@suse.de> | 2014-11-14 13:32:56 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2014-11-14 13:32:56 +0000 |
commit | d2a858011c4d9c1ff8d45484ef6d40aeaffeaf10 (patch) | |
tree | e4d71de012905eda50a0432c5be7efd7d50f5e4a /gcc/gimple-fold.c | |
parent | a5dde6ddac80b3a6e4cb3d988c5c449108411704 (diff) | |
download | gcc-d2a858011c4d9c1ff8d45484ef6d40aeaffeaf10.zip gcc-d2a858011c4d9c1ff8d45484ef6d40aeaffeaf10.tar.gz gcc-d2a858011c4d9c1ff8d45484ef6d40aeaffeaf10.tar.bz2 |
gimple-fold.h (gimple_fold_stmt_to_constant_1): Add 2nd valueization hook defaulted to no_follow_ssa_edges.
2014-11-14 Richard Biener <rguenther@suse.de>
* gimple-fold.h (gimple_fold_stmt_to_constant_1): Add 2nd
valueization hook defaulted to no_follow_ssa_edges.
* gimple-fold.c (gimple_fold_stmt_to_constant_1): Pass
2nd valueization hook to gimple_simplify.
* tree-ssa-ccp.c (valueize_op_1): New function to be
used for gimple_simplify called via gimple_fold_stmt_to_constant_1.
(ccp_fold): Adjust.
* tree-vrp.c (vrp_valueize_1): New function to be
used for gimple_simplify called via gimple_fold_stmt_to_constant_1.
(vrp_visit_assignment_or_call): Adjust.
From-SVN: r217560
Diffstat (limited to 'gcc/gimple-fold.c')
-rw-r--r-- | gcc/gimple-fold.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/gimple-fold.c b/gcc/gimple-fold.c index aeb1803..acdadcd 100644 --- a/gcc/gimple-fold.c +++ b/gcc/gimple-fold.c @@ -4467,7 +4467,8 @@ maybe_fold_or_comparisons (enum tree_code code1, tree op1a, tree op1b, to avoid the indirect function call overhead. */ tree -gimple_fold_stmt_to_constant_1 (gimple stmt, tree (*valueize) (tree)) +gimple_fold_stmt_to_constant_1 (gimple stmt, tree (*valueize) (tree), + tree (*gvalueize) (tree)) { code_helper rcode; tree ops[3] = {}; @@ -4475,7 +4476,7 @@ gimple_fold_stmt_to_constant_1 (gimple stmt, tree (*valueize) (tree)) edges if there are intermediate VARYING defs. For this reason do not follow SSA edges here even though SCCVN can technically just deal fine with that. */ - if (gimple_simplify (stmt, &rcode, ops, NULL, no_follow_ssa_edges) + if (gimple_simplify (stmt, &rcode, ops, NULL, gvalueize) && rcode.is_tree_code () && (TREE_CODE_LENGTH ((tree_code) rcode) == 0 || ((tree_code) rcode) == ADDR_EXPR) |