tree-complex.c (init_dont_simulate_again): Clear DONT_SIMULATE_AGAIN for control-altering statements; set it again for returns.
* tree-complex.c (init_dont_simulate_again): Clear DONT_SIMULATE_AGAIN for control-altering statements; set it again for returns. (complex_visit_stmt): Return SSA_PROP_VARYING for stmts that are not MODIFY_EXPR. From-SVN: r101178
This commit is contained in:
parent
aad97b9bdd
commit
99e6bdda90
@ -1,3 +1,10 @@
|
|||||||
|
2005-06-18 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
|
* tree-complex.c (init_dont_simulate_again): Clear DONT_SIMULATE_AGAIN
|
||||||
|
for control-altering statements; set it again for returns.
|
||||||
|
(complex_visit_stmt): Return SSA_PROP_VARYING for stmts that are
|
||||||
|
not MODIFY_EXPR.
|
||||||
|
|
||||||
2005-06-18 Richard Henderson <rth@redhat.com>
|
2005-06-18 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
PR tree-opt/22116
|
PR tree-opt/22116
|
||||||
|
@ -160,12 +160,20 @@ init_dont_simulate_again (void)
|
|||||||
for (bsi = bsi_start (bb); !bsi_end_p (bsi); bsi_next (&bsi))
|
for (bsi = bsi_start (bb); !bsi_end_p (bsi); bsi_next (&bsi))
|
||||||
{
|
{
|
||||||
tree orig_stmt, stmt, rhs = NULL;
|
tree orig_stmt, stmt, rhs = NULL;
|
||||||
bool dsa = true;
|
bool dsa;
|
||||||
|
|
||||||
orig_stmt = stmt = bsi_stmt (bsi);
|
orig_stmt = stmt = bsi_stmt (bsi);
|
||||||
|
|
||||||
|
/* Most control-altering statements must be initially
|
||||||
|
simulated, else we won't cover the entire cfg. */
|
||||||
|
dsa = !stmt_ends_bb_p (stmt);
|
||||||
|
|
||||||
switch (TREE_CODE (stmt))
|
switch (TREE_CODE (stmt))
|
||||||
{
|
{
|
||||||
case RETURN_EXPR:
|
case RETURN_EXPR:
|
||||||
|
/* We don't care what the lattice value of <retval> is,
|
||||||
|
since it's never used as an input to another computation. */
|
||||||
|
dsa = true;
|
||||||
stmt = TREE_OPERAND (stmt, 0);
|
stmt = TREE_OPERAND (stmt, 0);
|
||||||
if (!stmt || TREE_CODE (stmt) != MODIFY_EXPR)
|
if (!stmt || TREE_CODE (stmt) != MODIFY_EXPR)
|
||||||
break;
|
break;
|
||||||
@ -228,15 +236,14 @@ complex_visit_stmt (tree stmt, edge *taken_edge_p ATTRIBUTE_UNUSED,
|
|||||||
unsigned int ver;
|
unsigned int ver;
|
||||||
tree lhs, rhs;
|
tree lhs, rhs;
|
||||||
|
|
||||||
/* These conditions should be satisfied due to the initial filter
|
if (TREE_CODE (stmt) != MODIFY_EXPR)
|
||||||
set up in init_dont_simulate_again. */
|
return SSA_PROP_VARYING;
|
||||||
if (TREE_CODE (stmt) == RETURN_EXPR)
|
|
||||||
stmt = TREE_OPERAND (stmt, 0);
|
|
||||||
gcc_assert (TREE_CODE (stmt) == MODIFY_EXPR);
|
|
||||||
|
|
||||||
lhs = TREE_OPERAND (stmt, 0);
|
lhs = TREE_OPERAND (stmt, 0);
|
||||||
rhs = TREE_OPERAND (stmt, 1);
|
rhs = TREE_OPERAND (stmt, 1);
|
||||||
|
|
||||||
|
/* These conditions should be satisfied due to the initial filter
|
||||||
|
set up in init_dont_simulate_again. */
|
||||||
gcc_assert (TREE_CODE (lhs) == SSA_NAME);
|
gcc_assert (TREE_CODE (lhs) == SSA_NAME);
|
||||||
gcc_assert (TREE_CODE (TREE_TYPE (lhs)) == COMPLEX_TYPE);
|
gcc_assert (TREE_CODE (TREE_TYPE (lhs)) == COMPLEX_TYPE);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user