summaryrefslogtreecommitdiff
path: root/gcc/flow.c
diff options
context:
space:
mode:
authorsteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2003-12-11 00:20:51 +0000
committersteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2003-12-11 00:20:51 +0000
commit5496dbfccb2ff4c2376e880ead7a87d7a9178609 (patch)
tree753b85b3ca471980585369128978b9ba6e133c3a /gcc/flow.c
parent65d06e81de1a9905f0d5d06ebd56c6bd40b842e4 (diff)
downloadgcc-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/flow.c')
-rw-r--r--gcc/flow.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/gcc/flow.c b/gcc/flow.c
index c2370880dd3..6be78fcf71a 100644
--- a/gcc/flow.c
+++ b/gcc/flow.c
@@ -376,7 +376,7 @@ first_insn_after_basic_block_note (basic_block block)
rtx insn;
/* Get the first instruction in the block. */
- insn = block->head;
+ insn = BB_HEAD (block);
if (insn == NULL_RTX)
return NULL_RTX;
@@ -505,7 +505,7 @@ verify_wide_reg_1 (rtx *px, void *pregno)
static void
verify_wide_reg (int regno, basic_block bb)
{
- rtx head = bb->head, end = bb->end;
+ rtx head = BB_HEAD (bb), end = BB_END (bb);
while (1)
{
@@ -822,7 +822,7 @@ delete_noop_moves (rtx f ATTRIBUTE_UNUSED)
FOR_EACH_BB (bb)
{
- for (insn = bb->head; insn != NEXT_INSN (bb->end); insn = next)
+ for (insn = BB_HEAD (bb); insn != NEXT_INSN (BB_END (bb)); insn = next)
{
next = NEXT_INSN (insn);
if (INSN_P (insn) && noop_move_p (insn))
@@ -1844,8 +1844,8 @@ init_propagate_block_info (basic_block bb, regset live, regset local_set,
/* If this block ends in a conditional branch, for each register
live from one side of the branch and not the other, record the
register as conditionally dead. */
- if (GET_CODE (bb->end) == JUMP_INSN
- && any_condjump_p (bb->end))
+ if (GET_CODE (BB_END (bb)) == JUMP_INSN
+ && any_condjump_p (BB_END (bb)))
{
regset_head diff_head;
regset diff = INITIALIZE_REG_SET (diff_head);
@@ -1870,7 +1870,7 @@ init_propagate_block_info (basic_block bb, regset live, regset local_set,
else
{
/* This can happen with a conditional jump to the next insn. */
- if (JUMP_LABEL (bb->end) != bb_true->head)
+ if (JUMP_LABEL (BB_END (bb)) != BB_HEAD (bb_true))
abort ();
/* Simplest way to do nothing. */
@@ -1882,7 +1882,7 @@ init_propagate_block_info (basic_block bb, regset live, regset local_set,
bb_false->global_live_at_start, BITMAP_XOR))
{
/* Extract the condition from the branch. */
- rtx set_src = SET_SRC (pc_set (bb->end));
+ rtx set_src = SET_SRC (pc_set (BB_END (bb)));
rtx cond_true = XEXP (set_src, 0);
rtx reg = XEXP (cond_true, 0);
@@ -1951,7 +1951,7 @@ init_propagate_block_info (basic_block bb, regset live, regset local_set,
&& ! current_function_calls_eh_return)))
{
rtx insn, set;
- for (insn = bb->end; insn != bb->head; insn = PREV_INSN (insn))
+ for (insn = BB_END (bb); insn != BB_HEAD (bb); insn = PREV_INSN (insn))
if (GET_CODE (insn) == INSN
&& (set = single_set (insn))
&& GET_CODE (SET_DEST (set)) == MEM)
@@ -2031,7 +2031,7 @@ propagate_block (basic_block bb, regset live, regset local_set,
/* Scan the block an insn at a time from end to beginning. */
changed = 0;
- for (insn = bb->end;; insn = prev)
+ for (insn = BB_END (bb); ; insn = prev)
{
/* If this is a call to `setjmp' et al, warn if any
non-volatile datum is live. */
@@ -2046,7 +2046,7 @@ propagate_block (basic_block bb, regset live, regset local_set,
else
changed |= NEXT_INSN (prev) != insn;
- if (insn == bb->head)
+ if (insn == BB_HEAD (bb))
break;
}
@@ -3313,8 +3313,8 @@ attempt_auto_inc (struct propagate_block_info *pbi, rtx inc, rtx insn,
new insn(s) and do the updates. */
emit_insn_before (insns, insn);
- if (pbi->bb->head == insn)
- pbi->bb->head = insns;
+ if (BB_HEAD (pbi->bb) == insn)
+ BB_HEAD (pbi->bb) = insns;
/* INCR will become a NOTE and INSN won't contain a
use of INCR_REG. If a use of INCR_REG was just placed in
@@ -4229,7 +4229,7 @@ count_or_remove_death_notes_bb (basic_block bb, int kill)
int count = 0;
rtx insn;
- for (insn = bb->head;; insn = NEXT_INSN (insn))
+ for (insn = BB_HEAD (bb); ; insn = NEXT_INSN (insn))
{
if (INSN_P (insn))
{
@@ -4273,7 +4273,7 @@ count_or_remove_death_notes_bb (basic_block bb, int kill)
}
}
- if (insn == bb->end)
+ if (insn == BB_END (bb))
break;
}
@@ -4300,7 +4300,7 @@ clear_log_links (sbitmap blocks)
{
basic_block bb = BASIC_BLOCK (i);
- for (insn = bb->head; insn != NEXT_INSN (bb->end);
+ for (insn = BB_HEAD (bb); insn != NEXT_INSN (BB_END (bb));
insn = NEXT_INSN (insn))
if (INSN_P (insn))
free_INSN_LIST_list (&LOG_LINKS (insn));