diff options
author | Richard Guenther <rguenther@suse.de> | 2008-03-10 11:58:09 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2008-03-10 11:58:09 +0000 |
commit | e5eff6a3f7ba289c64222728bf59c44b415f5c22 (patch) | |
tree | 2c800d7e811979a56ad0b7f6af1fedea51b90093 /gcc/tree-ssa-pre.c | |
parent | 0d4c700c609c8ada881054655f7d60aeb8492ff7 (diff) | |
download | gcc-e5eff6a3f7ba289c64222728bf59c44b415f5c22.zip gcc-e5eff6a3f7ba289c64222728bf59c44b415f5c22.tar.gz gcc-e5eff6a3f7ba289c64222728bf59c44b415f5c22.tar.bz2 |
tree-ssa-pre.c (get_sccvn_value): Simplify.
2008-03-10 Richard Guenther <rguenther@suse.de>
* tree-ssa-pre.c (get_sccvn_value): Simplify.
(compute_avail): Do not add stmt uses to AVAIL_OUT.
From-SVN: r133074
Diffstat (limited to 'gcc/tree-ssa-pre.c')
-rw-r--r-- | gcc/tree-ssa-pre.c | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c index a488257..b75fa64 100644 --- a/gcc/tree-ssa-pre.c +++ b/gcc/tree-ssa-pre.c @@ -3243,19 +3243,6 @@ get_sccvn_value (tree name) it. */ if (!valvh && !is_invariant) { - tree defstmt = SSA_NAME_DEF_STMT (val); - - gcc_assert (VN_INFO (val)->valnum == val); - /* PHI nodes can't have vuses and attempts to iterate over - their VUSE operands will crash. */ - if (TREE_CODE (defstmt) == PHI_NODE || IS_EMPTY_STMT (defstmt)) - defstmt = NULL; - { - tree defstmt2 = SSA_NAME_DEF_STMT (name); - if (TREE_CODE (defstmt2) != PHI_NODE && - !ZERO_SSA_OPERANDS (defstmt2, SSA_OP_ALL_VIRTUALS)) - gcc_assert (defstmt); - } /* We lookup with the LHS, so do not use vn_lookup_or_add_with_stmt here, as that will result in useless reference lookups. */ valvh = vn_lookup_or_add (val); @@ -3562,7 +3549,6 @@ compute_avail (void) { if (make_values_for_stmt (stmt, block)) continue; - } /* For any other statement that we don't recognize, simply @@ -3571,12 +3557,9 @@ compute_avail (void) FOR_EACH_SSA_TREE_OPERAND (op, stmt, iter, SSA_OP_DEF) add_to_sets (op, op, NULL, TMP_GEN (block), AVAIL_OUT (block)); + /* Also add all referenced SSA_NAMEs to EXP_GEN. */ FOR_EACH_SSA_TREE_OPERAND (op, stmt, iter, SSA_OP_USE) - { - add_to_sets (op, op, NULL, NULL , AVAIL_OUT (block)); - if (TREE_CODE (op) == SSA_NAME || can_PRE_operation (op)) - add_to_exp_gen (block, op); - } + add_to_exp_gen (block, op); } /* Put the dominator children of BLOCK on the worklist of blocks |