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/cfganal.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/cfganal.c')
-rw-r--r-- | gcc/cfganal.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/gcc/cfganal.c b/gcc/cfganal.c index e45b48465e2..91297e53daa 100644 --- a/gcc/cfganal.c +++ b/gcc/cfganal.c @@ -89,7 +89,7 @@ forwarder_block_p (basic_block bb) || !bb->succ || bb->succ->succ_next) return false; - for (insn = bb->head; insn != bb->end; insn = NEXT_INSN (insn)) + for (insn = BB_HEAD (bb); insn != BB_END (bb); insn = NEXT_INSN (insn)) if (INSN_P (insn) && flow_active_insn_p (insn)) return false; @@ -103,8 +103,8 @@ forwarder_block_p (basic_block bb) bool can_fallthru (basic_block src, basic_block target) { - rtx insn = src->end; - rtx insn2 = target == EXIT_BLOCK_PTR ? NULL : target->head; + rtx insn = BB_END (src); + rtx insn2 = target == EXIT_BLOCK_PTR ? NULL : BB_HEAD (target); if (src->next_bb != target) return 0; @@ -232,11 +232,11 @@ set_edge_can_fallthru_flag (void) CAN_FALLTHRU edges. */ if (!bb->succ || !bb->succ->succ_next || bb->succ->succ_next->succ_next) continue; - if (!any_condjump_p (bb->end)) + if (!any_condjump_p (BB_END (bb))) continue; - if (!invert_jump (bb->end, JUMP_LABEL (bb->end), 0)) + if (!invert_jump (BB_END (bb), JUMP_LABEL (BB_END (bb)), 0)) continue; - invert_jump (bb->end, JUMP_LABEL (bb->end), 0); + invert_jump (BB_END (bb), JUMP_LABEL (BB_END (bb)), 0); bb->succ->flags |= EDGE_CAN_FALLTHRU; bb->succ->succ_next->flags |= EDGE_CAN_FALLTHRU; } @@ -305,10 +305,10 @@ flow_call_edges_add (sbitmap blocks) if (check_last_block) { basic_block bb = EXIT_BLOCK_PTR->prev_bb; - rtx insn = bb->end; + rtx insn = BB_END (bb); /* Back up past insns that must be kept in the same block as a call. */ - while (insn != bb->head + while (insn != BB_HEAD (bb) && keep_with_call_p (insn)) insn = PREV_INSN (insn); @@ -342,7 +342,7 @@ flow_call_edges_add (sbitmap blocks) if (blocks && !TEST_BIT (blocks, i)) continue; - for (insn = bb->end; ; insn = prev_insn) + for (insn = BB_END (bb); ; insn = prev_insn) { prev_insn = PREV_INSN (insn); if (need_fake_edge_p (insn)) @@ -353,7 +353,7 @@ flow_call_edges_add (sbitmap blocks) /* Don't split the block between a call and an insn that should remain in the same block as the call. */ if (GET_CODE (insn) == CALL_INSN) - while (split_at_insn != bb->end + while (split_at_insn != BB_END (bb) && keep_with_call_p (NEXT_INSN (split_at_insn))) split_at_insn = NEXT_INSN (split_at_insn); @@ -363,7 +363,7 @@ flow_call_edges_add (sbitmap blocks) cause us to mark that edge as fake and remove it later. */ #ifdef ENABLE_CHECKING - if (split_at_insn == bb->end) + if (split_at_insn == BB_END (bb)) for (e = bb->succ; e; e = e->succ_next) if (e->dest == EXIT_BLOCK_PTR) abort (); @@ -371,7 +371,7 @@ flow_call_edges_add (sbitmap blocks) /* Note that the following may create a new basic block and renumber the existing basic blocks. */ - if (split_at_insn != bb->end) + if (split_at_insn != BB_END (bb)) { e = split_block (bb, split_at_insn); if (e) @@ -381,7 +381,7 @@ flow_call_edges_add (sbitmap blocks) make_edge (bb, EXIT_BLOCK_PTR, EDGE_FAKE); } - if (insn == bb->head) + if (insn == BB_HEAD (bb)) break; } } |