aboutsummaryrefslogtreecommitdiff
path: root/gcc/basic-block.h
diff options
context:
space:
mode:
authorZdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>2002-05-16 10:34:53 -0700
committerRichard Henderson <rth@gcc.gnu.org>2002-05-16 10:34:53 -0700
commit355e4ec44580fbe7c605e726afee6e2eba03f905 (patch)
tree47d672ee2344eb156d43b4e6fc935c02ed904ce7 /gcc/basic-block.h
parent5a566bed2b7e0133247fa9fb3282116a8405dd3f (diff)
downloadgcc-355e4ec44580fbe7c605e726afee6e2eba03f905.zip
gcc-355e4ec44580fbe7c605e726afee6e2eba03f905.tar.gz
gcc-355e4ec44580fbe7c605e726afee6e2eba03f905.tar.bz2
Basic block renumbering removal.
From-SVN: r53522
Diffstat (limited to 'gcc/basic-block.h')
-rw-r--r--gcc/basic-block.h34
1 files changed, 27 insertions, 7 deletions
diff --git a/gcc/basic-block.h b/gcc/basic-block.h
index 5615b14..75d97cb 100644
--- a/gcc/basic-block.h
+++ b/gcc/basic-block.h
@@ -203,8 +203,11 @@ typedef struct basic_block_def {
/* Auxiliary info specific to a pass. */
void *aux;
- /* The index of this block. */
- int index;
+ /* The index of a block. */
+ int sindex;
+
+ /* Previous and next blocks in the chain. */
+ struct basic_block_def *prev_bb, *next_bb;
/* The loop depth of this block. */
int loop_depth;
@@ -228,7 +231,11 @@ typedef struct basic_block_def {
/* Number of basic blocks in the current function. */
-extern int n_basic_blocks;
+extern int num_basic_blocks;
+
+/* First free basic block number. */
+
+extern int last_basic_block;
/* Number of edges in the current function. */
@@ -240,6 +247,16 @@ extern varray_type basic_block_info;
#define BASIC_BLOCK(N) (VARRAY_BB (basic_block_info, (N)))
+/* For iterating over basic blocks. */
+#define FOR_BB_BETWEEN(BB, FROM, TO, DIR) \
+ for (BB = FROM; BB != TO; BB = BB->DIR)
+
+#define FOR_ALL_BB(BB) \
+ FOR_BB_BETWEEN (BB, ENTRY_BLOCK_PTR->next_bb, EXIT_BLOCK_PTR, next_bb)
+
+#define FOR_ALL_BB_REVERSE(BB) \
+ FOR_BB_BETWEEN (BB, EXIT_BLOCK_PTR->prev_bb, ENTRY_BLOCK_PTR, prev_bb)
+
/* What registers are live at the setjmp call. */
extern regset regs_live_at_setjmp;
@@ -284,7 +301,7 @@ extern struct basic_block_def entry_exit_blocks[2];
extern varray_type basic_block_for_insn;
#define BLOCK_FOR_INSN(INSN) VARRAY_BB (basic_block_for_insn, INSN_UID (INSN))
-#define BLOCK_NUM(INSN) (BLOCK_FOR_INSN (INSN)->index + 0)
+#define BLOCK_NUM(INSN) (BLOCK_FOR_INSN (INSN)->sindex + 0)
extern void compute_bb_for_insn PARAMS ((int));
extern void free_bb_for_insn PARAMS ((void));
@@ -314,8 +331,8 @@ extern void remove_edge PARAMS ((edge));
extern void redirect_edge_succ PARAMS ((edge, basic_block));
extern edge redirect_edge_succ_nodup PARAMS ((edge, basic_block));
extern void redirect_edge_pred PARAMS ((edge, basic_block));
-extern basic_block create_basic_block_structure PARAMS ((int, rtx, rtx, rtx));
-extern basic_block create_basic_block PARAMS ((int, rtx, rtx));
+extern basic_block create_basic_block_structure PARAMS ((int, rtx, rtx, rtx, basic_block));
+extern basic_block create_basic_block PARAMS ((rtx, rtx, basic_block));
extern int flow_delete_block PARAMS ((basic_block));
extern int flow_delete_block_noexpunge PARAMS ((basic_block));
extern void clear_bb_flags PARAMS ((void));
@@ -639,12 +656,15 @@ extern void reorder_basic_blocks PARAMS ((void));
extern void dump_bb PARAMS ((basic_block, FILE *));
extern void debug_bb PARAMS ((basic_block));
extern void debug_bb_n PARAMS ((int));
+extern basic_block debug_num2bb PARAMS ((int));
extern void dump_regset PARAMS ((regset, FILE *));
extern void debug_regset PARAMS ((regset));
extern void allocate_reg_life_data PARAMS ((void));
extern void allocate_bb_life_data PARAMS ((void));
extern void expunge_block PARAMS ((basic_block));
-extern void expunge_block_nocompact PARAMS ((basic_block));
+extern void link_block PARAMS ((basic_block, basic_block));
+extern void unlink_block PARAMS ((basic_block));
+extern void compact_blocks PARAMS ((void));
extern basic_block alloc_block PARAMS ((void));
extern void find_unreachable_blocks PARAMS ((void));
extern int delete_noop_moves PARAMS ((rtx));