diff options
Diffstat (limited to 'gcc/tree-ssa-ccp.c')
-rw-r--r-- | gcc/tree-ssa-ccp.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c index da6b7855a81..4b6fe6a1b69 100644 --- a/gcc/tree-ssa-ccp.c +++ b/gcc/tree-ssa-ccp.c @@ -310,13 +310,10 @@ get_symbol_constant_value (tree sym) change the constant value of the PHI node, which allows for more constants to be propagated. - 3- If SSA_NAME_VALUE is set and it is a constant, its value is - used. - - 4- Variables defined by statements other than assignments and PHI + 3- Variables defined by statements other than assignments and PHI nodes are considered VARYING. - 5- Initial values of variables that are not GIMPLE registers are + 4- Initial values of variables that are not GIMPLE registers are considered VARYING. */ static prop_value_t @@ -332,12 +329,6 @@ get_default_value (tree var) non-register when DO_STORE_CCP is false. */ val.lattice_val = VARYING; } - else if (SSA_NAME_VALUE (var) - && is_gimple_min_invariant (SSA_NAME_VALUE (var))) - { - val.lattice_val = CONSTANT; - val.value = SSA_NAME_VALUE (var); - } else if ((cst_val = get_symbol_constant_value (sym)) != NULL_TREE) { /* Globals and static variables declared 'const' take their @@ -2825,8 +2816,9 @@ convert_to_gimple_builtin (block_stmt_iterator *si_p, tree expr, bool ignore) tree_stmt_iterator ti; tree stmt = bsi_stmt (*si_p); tree tmp, stmts = NULL; + struct gimplify_ctx gctx; - push_gimplify_context (); + push_gimplify_context (&gctx); if (ignore) { tmp = build_empty_stmt (); |