diff options
author | steven <steven@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-12-11 00:20:51 +0000 |
---|---|---|
committer | steven <steven@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-12-11 00:20:51 +0000 |
commit | 5496dbfccb2ff4c2376e880ead7a87d7a9178609 (patch) | |
tree | 753b85b3ca471980585369128978b9ba6e133c3a /gcc/cfgbuild.c | |
parent | 65d06e81de1a9905f0d5d06ebd56c6bd40b842e4 (diff) | |
download | gcc-5496dbfccb2ff4c2376e880ead7a87d7a9178609.tar.gz |
2003-12-11 Steven Bosscher <steven@gcc.gnu.org>
* basic-block.h (BLOCK_HEAD, BLOCK_END): Remove.
(BLOCK_HEAD_TREE, BLOCK_END_TREE): Remove.
(basic_block_def): Rename `head' to `head_' and `end' to `end_'.
(BB_HEAD, BB_END): New accessor macros for the `head_' and `end_'
fields of a basic block.
* bb-reorder.c, bt-load.c, caller-save.c, cfg.c, cfganal.c,
cfgbuild.c, cfgcleanup.c, cfglayout.c, cfgloop.c, cfgloopanal.c,
cfgloopmanip.c, cfgrtl.c, combine.c, conflict.c, df.c, emit-rtl.c,
final.c, flow.c, function.c, gcse.c, global.c, graph.c,
haifa-sched.c, ifcvt.c, lcm.c, local-alloc.c, loop-unswitch.c,
loop.c, postreload.c, predict.c, profile.c, ra-build.c, ra-debug.c,
ra-rewrite.c, ra.c, recog.c, reg-stack.c, regclass.c, regmove.c,
regrename.c, reload1.c, resource.c, sched-ebb.c, sched-rgn.c,
sibcall.c, tracer.c, config/frv/frv.c, config/i386/i386.c,
config/ia64/ia64.c: Use the BB_HEAD and BB_END macros instead of
accessing the `head' and `end' fields of a basic block directly.
* gengtype.c: Add missing piece from earlier patch. Dunno what
I was thinking...
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74520 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgbuild.c')
-rw-r--r-- | gcc/cfgbuild.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/gcc/cfgbuild.c b/gcc/cfgbuild.c index 1fb43605972..5805e587ec8 100644 --- a/gcc/cfgbuild.c +++ b/gcc/cfgbuild.c @@ -303,13 +303,14 @@ make_edges (rtx label_value_list, basic_block min, basic_block max, int update_p enum rtx_code code; int force_fallthru = 0; - if (GET_CODE (bb->head) == CODE_LABEL && LABEL_ALT_ENTRY_P (bb->head)) + if (GET_CODE (BB_HEAD (bb)) == CODE_LABEL + && LABEL_ALT_ENTRY_P (BB_HEAD (bb))) cached_make_edge (NULL, ENTRY_BLOCK_PTR, bb, 0); /* Examine the last instruction of the block, and discover the ways we can leave the block. */ - insn = bb->end; + insn = BB_END (bb); code = GET_CODE (insn); /* A branch. */ @@ -432,7 +433,7 @@ make_edges (rtx label_value_list, basic_block min, basic_block max, int update_p cached_make_edge (edge_cache, bb, EXIT_BLOCK_PTR, EDGE_FALLTHRU); else if (bb->next_bb != EXIT_BLOCK_PTR) { - if (force_fallthru || insn == bb->next_bb->head) + if (force_fallthru || insn == BB_HEAD (bb->next_bb)) cached_make_edge (edge_cache, bb, bb->next_bb, EDGE_FALLTHRU); } } @@ -649,12 +650,12 @@ enum state {BLOCK_NEW = 0, BLOCK_ORIGINAL, BLOCK_TO_SPLIT}; static void find_bb_boundaries (basic_block bb) { - rtx insn = bb->head; - rtx end = bb->end; + rtx insn = BB_HEAD (bb); + rtx end = BB_END (bb); rtx flow_transfer_insn = NULL_RTX; edge fallthru = NULL; - if (insn == bb->end) + if (insn == BB_END (bb)) return; if (GET_CODE (insn) == CODE_LABEL) @@ -670,7 +671,7 @@ find_bb_boundaries (basic_block bb) { fallthru = split_block (bb, PREV_INSN (insn)); if (flow_transfer_insn) - bb->end = flow_transfer_insn; + BB_END (bb) = flow_transfer_insn; bb = fallthru->dest; remove_edge (fallthru); @@ -684,7 +685,7 @@ find_bb_boundaries (basic_block bb) if (flow_transfer_insn && inside_basic_block_p (insn)) { fallthru = split_block (bb, PREV_INSN (insn)); - bb->end = flow_transfer_insn; + BB_END (bb) = flow_transfer_insn; bb = fallthru->dest; remove_edge (fallthru); flow_transfer_insn = NULL_RTX; @@ -701,7 +702,7 @@ find_bb_boundaries (basic_block bb) return and barrier, or possibly other sequence not behaving like ordinary jump, we need to take care and move basic block boundary. */ if (flow_transfer_insn) - bb->end = flow_transfer_insn; + BB_END (bb) = flow_transfer_insn; /* We've possibly replaced the conditional jump by conditional jump followed by cleanup at fallthru edge, so the outgoing edges may @@ -719,7 +720,7 @@ compute_outgoing_frequencies (basic_block b) if (b->succ && b->succ->succ_next && !b->succ->succ_next->succ_next) { - rtx note = find_reg_note (b->end, REG_BR_PROB, NULL); + rtx note = find_reg_note (BB_END (b), REG_BR_PROB, NULL); int probability; if (!note) |