+2005-04-14 Daniel Berlin <dberlin@dberlin.org>
+
+ Fix PR tree-optimization/20963
+ * tree-ssa-pre.c (compute_avail): Remove special case for
+ TREE_INVARIANT.
+ (create_expression_by_pieces): Add value numbers for forced out
+ statements.
+
2005-04-14 Hans-Peter Nilsson <hp@axis.com>
* config/cris/cris.md: Replace references to (reg:SI 16) with
newexpr = force_gimple_operand (folded, &forced_stmts, false, NULL);
if (forced_stmts)
{
+ tsi = tsi_start (forced_stmts);
+ for (; !tsi_end_p (tsi); tsi_next (&tsi))
+ {
+ tree stmt = tsi_stmt (tsi);
+ tree forcedname = TREE_OPERAND (stmt, 0);
+ tree forcedexpr = TREE_OPERAND (stmt, 1);
+ tree val = vn_lookup_or_add (forcedexpr, NULL);
+ vn_add (forcedname, val, NULL);
+ bitmap_value_replace_in_set (NEW_SETS (block), forcedname);
+ bitmap_value_replace_in_set (AVAIL_OUT (block), forcedname);
+ }
+
tsi = tsi_last (stmts);
tsi_link_after (&tsi, forced_stmts, TSI_CONTINUE_LINKING);
}
newexpr = force_gimple_operand (folded, &forced_stmts, false, NULL);
if (forced_stmts)
{
+ tsi = tsi_start (forced_stmts);
+ for (; !tsi_end_p (tsi); tsi_next (&tsi))
+ {
+ tree stmt = tsi_stmt (tsi);
+ tree forcedname = TREE_OPERAND (stmt, 0);
+ tree forcedexpr = TREE_OPERAND (stmt, 1);
+ tree val = vn_lookup_or_add (forcedexpr, NULL);
+ vn_add (forcedname, val, NULL);
+ bitmap_value_replace_in_set (NEW_SETS (block), forcedname);
+ bitmap_value_replace_in_set (AVAIL_OUT (block), forcedname);
+ }
tsi = tsi_last (stmts);
tsi_link_after (&tsi, forced_stmts, TSI_CONTINUE_LINKING);
}
}
else if (TREE_CODE (rhs) == SSA_NAME
|| is_gimple_min_invariant (rhs)
- || TREE_INVARIANT (rhs)
|| TREE_CODE (rhs) == ADDR_EXPR
|| DECL_P (rhs))
{