diff options
author | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-10-16 16:58:59 +0000 |
---|---|---|
committer | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-10-16 16:58:59 +0000 |
commit | 6b9d2769c968b617009094864bbe4e6e03b621e2 (patch) | |
tree | 0af8e2a4f49682307883dde1cf867f72847cd300 /gcc/dominance.c | |
parent | 0a501ca61f3e4bc9da771b30929311bca9cb166b (diff) | |
download | gcc-6b9d2769c968b617009094864bbe4e6e03b621e2.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@89147 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dominance.c')
-rw-r--r-- | gcc/dominance.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/gcc/dominance.c b/gcc/dominance.c index 680c4561c9d..47cb4057e65 100644 --- a/gcc/dominance.c +++ b/gcc/dominance.c @@ -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) { |