aboutsummaryrefslogtreecommitdiff
path: root/gcc/dominance.c
diff options
context:
space:
mode:
authorZdenek Dvorak <dvorakz@suse.cz>2006-08-16 23:25:39 +0200
committerZdenek Dvorak <rakdver@gcc.gnu.org>2006-08-16 21:25:39 +0000
commitf074ff6cc07a8b34a63c2c469d38130aceb87408 (patch)
tree6f3474092c924d2afcf2cb8918768de6c4b76758 /gcc/dominance.c
parentb43a2366d696649472d8615dec3765fecc54477a (diff)
downloadgcc-f074ff6cc07a8b34a63c2c469d38130aceb87408.zip
gcc-f074ff6cc07a8b34a63c2c469d38130aceb87408.tar.gz
gcc-f074ff6cc07a8b34a63c2c469d38130aceb87408.tar.bz2
re PR middle-end/28071 (A file that can not be compiled in reasonable time/space)
PR rtl-optimization/28071 * basic-block.h (bb_dom_dfs_in, bb_dom_dfs_out): Declare. * dominance.c (bb_dom_dfs_in, bb_dom_dfs_out): New functions. * tree-into-ssa.c (struct dom_dfsnum): New. (cmp_dfsnum, find_dfsnum_interval, prune_unused_phi_nodes): New functions. (insert_phi_nodes_for): Use prune_unused_phi_nodes instead of compute_global_livein. (prepare_block_for_update, prepare_use_sites_for): Mark the uses in phi nodes in the correct blocks. From-SVN: r116190
Diffstat (limited to 'gcc/dominance.c')
-rw-r--r--gcc/dominance.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/dominance.c b/gcc/dominance.c
index ca6d154..819e7d4 100644
--- a/gcc/dominance.c
+++ b/gcc/dominance.c
@@ -909,6 +909,28 @@ dominated_by_p (enum cdi_direction dir, basic_block bb1, basic_block bb2)
return et_below (n1, n2);
}
+/* Returns the entry dfs number for basic block BB, in the direction DIR. */
+
+unsigned
+bb_dom_dfs_in (enum cdi_direction dir, basic_block bb)
+{
+ struct et_node *n = bb->dom[dir];
+
+ gcc_assert (dom_computed[dir] == DOM_OK);
+ return n->dfs_num_in;
+}
+
+/* Returns the exit dfs number for basic block BB, in the direction DIR. */
+
+unsigned
+bb_dom_dfs_out (enum cdi_direction dir, basic_block bb)
+{
+ struct et_node *n = bb->dom[dir];
+
+ gcc_assert (dom_computed[dir] == DOM_OK);
+ return n->dfs_num_out;
+}
+
/* Verify invariants of dominator structure. */
void
verify_dominators (enum cdi_direction dir)