summaryrefslogtreecommitdiff
path: root/gcc/cfgbuild.c
diff options
context:
space:
mode:
authorrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2002-05-28 12:53:47 +0000
committerrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2002-05-28 12:53:47 +0000
commit3c0a32c9310d31a517b77e5e0b78c8464df21b63 (patch)
treee6c0737229b9c2c57cf0353f3dd15ebecc686b75 /gcc/cfgbuild.c
parent39ebe913b0f38d9a0b7c090d2dcba03c777ba3d6 (diff)
downloadgcc-3c0a32c9310d31a517b77e5e0b78c8464df21b63.tar.gz
* basic-block.h (last_basic_block): Declare.
(expunge_block_nocompact): Declaration removed. (compact_blocks): Declare. * cfg.c (last_basic_block): New variable. (expunge_block_nocompact): Removed. (expunge_block): Do not compact basic blocks. (compact_blocks): New. * cfganal.c (flow_call_edges_add): Use the fact that bb indices no longer change. * cfgbuild.c (find_basic_blocks_1, find_basic_blocks): Set last_basic_block. * cfgcleanup.c (merge_blocks_move_predecessor_nojumps): Do not change real positions of blocks. (delete_unreachable_blocks): Simplified -- quadratic behavior now cannot occur. (cleanup_cfg): Compact blocks. * cfgrtl.c (create_basic_block): Insert basic blocks to the end of basic_block_info varray. (flow_delete_block): Comment update. (back_edge_of_syntactic_loop_p): Modify position check code. (verify_flow_info): Update checking. * flow.c (calculate_global_regs_live): Use FOR_EACH_BB. * ifcvt.c (SET_ORIG_INDEX, ORIG_INDEX): Removed. (find_if_case_1, find_if_case_2, if_convert): Use the fact that bb indices no longer change. * lcm.c (optimize_mode_switching): Replace n_basic_blocks with last_basic_block. * predict.c (estimate_bb_frequencies): Remove unneccessary code. * profile.c (branch_prob): Compact blocks. * sched-rgn.c (find_rgns): Replace n_basic_blocks with last_basic_block. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53957 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgbuild.c')
-rw-r--r--gcc/cfgbuild.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/cfgbuild.c b/gcc/cfgbuild.c
index 3a86e1ca8f3..bdf175d53af 100644
--- a/gcc/cfgbuild.c
+++ b/gcc/cfgbuild.c
@@ -471,7 +471,6 @@ find_basic_blocks_1 (f)
rtx f;
{
rtx insn, next;
- int i = 0;
rtx bb_note = NULL_RTX;
rtx lvl = NULL_RTX;
rtx trll = NULL_RTX;
@@ -494,7 +493,7 @@ find_basic_blocks_1 (f)
if ((GET_CODE (insn) == CODE_LABEL || GET_CODE (insn) == BARRIER)
&& head)
{
- prev = create_basic_block_structure (i++, head, end, bb_note, prev);
+ prev = create_basic_block_structure (last_basic_block++, head, end, bb_note, prev);
head = end = NULL_RTX;
bb_note = NULL_RTX;
}
@@ -508,7 +507,7 @@ find_basic_blocks_1 (f)
if (head && control_flow_insn_p (insn))
{
- prev = create_basic_block_structure (i++, head, end, bb_note, prev);
+ prev = create_basic_block_structure (last_basic_block++, head, end, bb_note, prev);
head = end = NULL_RTX;
bb_note = NULL_RTX;
}
@@ -590,11 +589,11 @@ find_basic_blocks_1 (f)
}
if (head != NULL_RTX)
- create_basic_block_structure (i++, head, end, bb_note, prev);
+ create_basic_block_structure (last_basic_block++, head, end, bb_note, prev);
else if (bb_note)
delete_insn (bb_note);
- if (i != n_basic_blocks)
+ if (last_basic_block != n_basic_blocks)
abort ();
label_value_list = lvl;
@@ -635,6 +634,7 @@ find_basic_blocks (f, nregs, file)
}
n_basic_blocks = count_basic_blocks (f);
+ last_basic_block = 0;
ENTRY_BLOCK_PTR->next_bb = EXIT_BLOCK_PTR;
EXIT_BLOCK_PTR->prev_bb = ENTRY_BLOCK_PTR;