aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfganal.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2001-09-11 18:58:57 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2001-09-11 16:58:57 +0000
commit4262e6231adab0ff8a3da565bf620037ce9b1343 (patch)
treee55ae3fa06b243cd5fe8bf5b133011184ac58d17 /gcc/cfganal.c
parent201556f0e005802b8ebb206a193a6feb55a555af (diff)
downloadgcc-4262e6231adab0ff8a3da565bf620037ce9b1343.zip
gcc-4262e6231adab0ff8a3da565bf620037ce9b1343.tar.gz
gcc-4262e6231adab0ff8a3da565bf620037ce9b1343.tar.bz2
basic-block.h (EDGE_CRITICAL): Remove; renumber other flags.
* basic-block.h (EDGE_CRITICAL): Remove; renumber other flags. (EDGE_CRITICAL_P): New predicate. * cfg.c (force_nonfallthru_and_redirect, split_edge): Kill EDGE_CRITICAL handling. (insert_insn_on_edge): Use EDGE_CRITICAL_P. (dump_edge_info): Remove "crit". * cfganal.c (mark_critical_edges): Kill. * cfgbuild.c (find_basic_blocks): Remove mark_critical_edges call. * cfgcleanup.c (cleanup_cfg): Likewise. * profile.c (instrument_edges): Use EDGE_CRITICAL_P. (find_spanning_tree): Likewise. * reg-stack.c (convert_regs_1): Likewise. * ssa.c (mark_regs_equivalent_over_bad_edges): Likewise. * basic-block.h (create_basic_block_structure): New. (create_basic_block): Update prototype. (force_nonfallthru): New. * bb-reorder.c (fixup_reorder_chain): Fixup use force_nonfallthru. * cfg.c (create_basic_block_structure): Rename from create_basic_block; handle updating of block_for_insn, creating of empty BBs and BBs at the end of INSN chain. (create_basic_block): New function. (split_block): Use create_basic_block. (force_nonfallthru_and_redirect): Break out from ...; cleanup (redirect_edge_and_branch_force): ... here. (force_nonfallthru): New. (split_edge): Rewrite to use force_nonfallthru and create_block. * cfgbuild.c (find_basic_blocks_1): Use create_basic_block_structure. (find_basic_blocks): Free basic_block_for_insn. * cfgcleanup.c (merge_blocks): Use force_nonfallthru. * cfg.c: Fix formating. * cfgcleanup.c: Fix formating. (merge_blocks, tail_recursion_label_p): Return bool. (merge_blocks_move_predecessor_nojumps, merge_blocks_move_successor_nojumps): Return void. From-SVN: r45549
Diffstat (limited to 'gcc/cfganal.c')
-rw-r--r--gcc/cfganal.c44
1 files changed, 0 insertions, 44 deletions
diff --git a/gcc/cfganal.c b/gcc/cfganal.c
index 5711794..5ad1a10 100644
--- a/gcc/cfganal.c
+++ b/gcc/cfganal.c
@@ -89,50 +89,6 @@ can_fallthru (src, target)
return next_active_insn (insn) == insn2;
}
-/* Identify critical edges and set the bits appropriately. */
-
-void
-mark_critical_edges ()
-{
- int i, n = n_basic_blocks;
- basic_block bb;
-
- /* We begin with the entry block. This is not terribly important now,
- but could be if a front end (Fortran) implemented alternate entry
- points. */
- bb = ENTRY_BLOCK_PTR;
- i = -1;
-
- while (1)
- {
- edge e;
-
- /* (1) Critical edges must have a source with multiple successors. */
- if (bb->succ && bb->succ->succ_next)
- {
- for (e = bb->succ; e; e = e->succ_next)
- {
- /* (2) Critical edges must have a destination with multiple
- predecessors. Note that we know there is at least one
- predecessor -- the edge we followed to get here. */
- if (e->dest->pred->pred_next)
- e->flags |= EDGE_CRITICAL;
- else
- e->flags &= ~EDGE_CRITICAL;
- }
- }
- else
- {
- for (e = bb->succ; e; e = e->succ_next)
- e->flags &= ~EDGE_CRITICAL;
- }
-
- if (++i >= n)
- break;
- bb = BASIC_BLOCK (i);
- }
-}
-
/* Mark the back edges in DFS traversal.
Return non-zero if a loop (natural or otherwise) is present.
Inspired by Depth_First_Search_PP described in: