From 852c6ec7ac379280e79ba706c60f2f1aad152f67 Mon Sep 17 00:00:00 2001 From: Roger Sayle Date: Mon, 10 Jun 2002 22:33:08 +0000 Subject: cfgrtl.c (create_basic_block_structure): Remove index argument and use last_basic_block++ instead. 2002-06-10 Roger Sayle Andreas Jaeger * cfgrtl.c (create_basic_block_structure): Remove index argument and use last_basic_block++ instead. (create_basic_block): Update. * cfgbuild.c (find_basic_blocks_1): Likewise. * cfgrtl.c (compute_bb_for_insn): Remove unused "max" argument. * haifa-sched.c (sched_init): Update compute_bb_for_insn caller. * sched-ebb.c (schedule_ebbs): Likewise. * sched-rgn.c (schedule_insns): Likewise. * ssa-ccp.c (ssa_const_prop): Likewise. * ssa-dcs.c (ssa_eliminate_dead_code): Likewise. * toplev.c (rest_of_compilation): Likewise. * config/ia64/ia64.c (ia64_reorg): Likewise. Co-Authored-By: Andreas Jaeger From-SVN: r54477 --- gcc/cfgrtl.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'gcc/cfgrtl.c') diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index e40ecf2..70bf73b 100644 --- a/gcc/cfgrtl.c +++ b/gcc/cfgrtl.c @@ -245,8 +245,7 @@ delete_insn_chain_and_edges (first, last) AFTER is the basic block we should be put after. */ basic_block -create_basic_block_structure (index, head, end, bb_note, after) - int index; +create_basic_block_structure (head, end, bb_note, after) rtx head, end, bb_note; basic_block after; { @@ -304,10 +303,10 @@ create_basic_block_structure (index, head, end, bb_note, after) bb->head = head; bb->end = end; - bb->index = index; + bb->index = last_basic_block++; bb->flags = BB_NEW; link_block (bb, after); - BASIC_BLOCK (index) = bb; + BASIC_BLOCK (bb->index) = bb; update_bb_for_insn (bb); /* Tag the block so that we know it has been used when considering @@ -328,14 +327,13 @@ create_basic_block (head, end, after) basic_block after; { basic_block bb; - int index = last_basic_block++; /* Place the new block just after the end. */ - VARRAY_GROW (basic_block_info, last_basic_block); + VARRAY_GROW (basic_block_info, last_basic_block+1); n_basic_blocks++; - bb = create_basic_block_structure (index, head, end, NULL, after); + bb = create_basic_block_structure (head, end, NULL, after); bb->aux = NULL; return bb; } @@ -423,12 +421,10 @@ flow_delete_block (b) return deleted_handler; } -/* Records the basic block struct in BB_FOR_INSN, for every instruction - indexed by INSN_UID. MAX is the size of the array. */ +/* Records the basic block struct in BLOCK_FOR_INSN for every insn. */ void -compute_bb_for_insn (max) - int max; +compute_bb_for_insn () { basic_block bb; -- cgit v1.1