re PR tree-optimization/17766 (cc1 hangs in with -O3, works with -O2)
PR tree-optimization/17766 * basic-block.h (enum dom_state): DOM_CONS_OK removed. (dom_info_available_p): Declare. * cfghooks.c (split_block, make_forwarder_block): Use dom_info_available_p. * dominance.c (compute_dom_fast_query, calculate_dominance_info, free_dominance_info, verify_dominators): Ditto. (dom_info_available_p): New function. * tree-cfg.c (cleanup_control_expr_graph): Free dominance information. (thread_jumps): Use dom_info_available_p. * tree-complex.c (expand_complex_div_wide): Ditto. * tree-mudflap.c (mf_build_check_statement_for): Ditto. From-SVN: r89147
This commit is contained in:
parent
80cad5faeb
commit
fce22de5d2
@ -1,3 +1,18 @@
|
||||
2004-10-16 Zdenek Dvorak <dvorakz@suse.cz>
|
||||
|
||||
PR tree-optimization/17766
|
||||
* basic-block.h (enum dom_state): DOM_CONS_OK removed.
|
||||
(dom_info_available_p): Declare.
|
||||
* cfghooks.c (split_block, make_forwarder_block): Use
|
||||
dom_info_available_p.
|
||||
* dominance.c (compute_dom_fast_query, calculate_dominance_info,
|
||||
free_dominance_info, verify_dominators): Ditto.
|
||||
(dom_info_available_p): New function.
|
||||
* tree-cfg.c (cleanup_control_expr_graph): Free dominance information.
|
||||
(thread_jumps): Use dom_info_available_p.
|
||||
* tree-complex.c (expand_complex_div_wide): Ditto.
|
||||
* tree-mudflap.c (mf_build_check_statement_for): Ditto.
|
||||
|
||||
2004-10-16 Zdenek Dvorak <dvorakz@suse.cz>
|
||||
|
||||
* tree-ssa-loop-ivopts.c (struct ivopts_data): New field important_candidates.
|
||||
|
@ -848,14 +848,13 @@ enum cdi_direction
|
||||
enum dom_state
|
||||
{
|
||||
DOM_NONE, /* Not computed at all. */
|
||||
DOM_CONS_OK, /* The data is conservatively OK, i.e. if it says you that A dominates B,
|
||||
it indeed does. */
|
||||
DOM_NO_FAST_QUERY, /* The data is OK, but the fast query data are not usable. */
|
||||
DOM_OK /* Everything is ok. */
|
||||
};
|
||||
|
||||
extern enum dom_state dom_computed[2];
|
||||
|
||||
extern bool dom_info_available_p (enum cdi_direction);
|
||||
extern void calculate_dominance_info (enum cdi_direction);
|
||||
extern void free_dominance_info (enum cdi_direction);
|
||||
extern basic_block nearest_common_dominator (enum cdi_direction,
|
||||
|
@ -318,7 +318,7 @@ split_block (basic_block bb, void *i)
|
||||
new_bb->frequency = bb->frequency;
|
||||
new_bb->loop_depth = bb->loop_depth;
|
||||
|
||||
if (dom_computed[CDI_DOMINATORS] >= DOM_CONS_OK)
|
||||
if (dom_info_available_p (CDI_DOMINATORS))
|
||||
{
|
||||
redirect_immediate_dominators (CDI_DOMINATORS, bb, new_bb);
|
||||
set_immediate_dominator (CDI_DOMINATORS, new_bb, bb);
|
||||
@ -592,7 +592,7 @@ make_forwarder_block (basic_block bb, bool (*redirect_edge_p) (edge),
|
||||
new_bb_cbk (jump);
|
||||
}
|
||||
|
||||
if (dom_computed[CDI_DOMINATORS] >= DOM_CONS_OK)
|
||||
if (dom_info_available_p (CDI_DOMINATORS))
|
||||
{
|
||||
basic_block doms_to_fix[2];
|
||||
|
||||
|
@ -592,7 +592,7 @@ compute_dom_fast_query (enum cdi_direction dir)
|
||||
int num = 0;
|
||||
basic_block bb;
|
||||
|
||||
gcc_assert (dom_computed[dir] >= DOM_NO_FAST_QUERY);
|
||||
gcc_assert (dom_info_available_p (dir));
|
||||
|
||||
if (dom_computed[dir] == DOM_OK)
|
||||
return;
|
||||
@ -618,11 +618,8 @@ calculate_dominance_info (enum cdi_direction dir)
|
||||
if (dom_computed[dir] == DOM_OK)
|
||||
return;
|
||||
|
||||
if (dom_computed[dir] != DOM_NO_FAST_QUERY)
|
||||
if (!dom_info_available_p (dir))
|
||||
{
|
||||
if (dom_computed[dir] != DOM_NONE)
|
||||
free_dominance_info (dir);
|
||||
|
||||
gcc_assert (!n_bbs_in_dom_tree[dir]);
|
||||
|
||||
FOR_ALL_BB (b)
|
||||
@ -656,7 +653,7 @@ free_dominance_info (enum cdi_direction dir)
|
||||
{
|
||||
basic_block bb;
|
||||
|
||||
if (!dom_computed[dir])
|
||||
if (!dom_info_available_p (dir))
|
||||
return;
|
||||
|
||||
FOR_ALL_BB (bb)
|
||||
@ -821,7 +818,7 @@ verify_dominators (enum cdi_direction dir)
|
||||
int err = 0;
|
||||
basic_block bb;
|
||||
|
||||
gcc_assert (dom_computed[dir]);
|
||||
gcc_assert (dom_info_available_p (dir));
|
||||
|
||||
FOR_EACH_BB (bb)
|
||||
{
|
||||
@ -841,8 +838,7 @@ verify_dominators (enum cdi_direction dir)
|
||||
}
|
||||
}
|
||||
|
||||
if (dir == CDI_DOMINATORS
|
||||
&& dom_computed[dir] >= DOM_NO_FAST_QUERY)
|
||||
if (dir == CDI_DOMINATORS)
|
||||
{
|
||||
FOR_EACH_BB (bb)
|
||||
{
|
||||
@ -977,6 +973,14 @@ next_dom_son (enum cdi_direction dir, basic_block bb)
|
||||
return next->father->son == next ? NULL : next->data;
|
||||
}
|
||||
|
||||
/* Returns true if dominance information for direction DIR is available. */
|
||||
|
||||
bool
|
||||
dom_info_available_p (enum cdi_direction dir)
|
||||
{
|
||||
return dom_computed[dir] != DOM_NONE;
|
||||
}
|
||||
|
||||
void
|
||||
debug_dominance_info (enum cdi_direction dir)
|
||||
{
|
||||
|
@ -1927,8 +1927,7 @@ cleanup_control_expr_graph (basic_block bb, block_stmt_iterator bsi)
|
||||
taken_edge->flags = EDGE_FALLTHRU;
|
||||
|
||||
/* We removed some paths from the cfg. */
|
||||
if (dom_computed[CDI_DOMINATORS] >= DOM_CONS_OK)
|
||||
dom_computed[CDI_DOMINATORS] = DOM_CONS_OK;
|
||||
free_dominance_info (CDI_DOMINATORS);
|
||||
|
||||
return retval;
|
||||
}
|
||||
@ -3908,7 +3907,7 @@ thread_jumps (void)
|
||||
}
|
||||
|
||||
/* Update the dominators. */
|
||||
if (dom_computed[CDI_DOMINATORS] >= DOM_CONS_OK)
|
||||
if (dom_info_available_p (CDI_DOMINATORS))
|
||||
{
|
||||
/* If the dominator of the destination was in the path, set its
|
||||
dominator to the start of the redirected edge. */
|
||||
|
@ -216,7 +216,7 @@ expand_complex_div_wide (block_stmt_iterator *bsi, tree inner_type,
|
||||
|
||||
/* Update dominance info. Note that bb_join's data was
|
||||
updated by split_block. */
|
||||
if (dom_computed[CDI_DOMINATORS] >= DOM_CONS_OK)
|
||||
if (dom_info_available_p (CDI_DOMINATORS))
|
||||
{
|
||||
set_immediate_dominator (CDI_DOMINATORS, bb_true, bb_cond);
|
||||
set_immediate_dominator (CDI_DOMINATORS, bb_false, bb_cond);
|
||||
|
@ -551,7 +551,7 @@ mf_build_check_statement_for (tree base, tree addr, tree limit,
|
||||
|
||||
/* Update dominance info. Note that bb_join's data was
|
||||
updated by split_block. */
|
||||
if (dom_computed[CDI_DOMINATORS] >= DOM_CONS_OK)
|
||||
if (dom_info_available_p (CDI_DOMINATORS))
|
||||
{
|
||||
set_immediate_dominator (CDI_DOMINATORS, then_bb, cond_bb);
|
||||
set_immediate_dominator (CDI_DOMINATORS, join_bb, cond_bb);
|
||||
|
Loading…
Reference in New Issue
Block a user