summaryrefslogtreecommitdiff
path: root/gcc/cfgloopanal.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/cfgloopanal.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/cfgloopanal.c')
-rw-r--r--gcc/cfgloopanal.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/gcc/cfgloopanal.c b/gcc/cfgloopanal.c
index 03bf4db7d76..3d6e69ef48d 100644
--- a/gcc/cfgloopanal.c
+++ b/gcc/cfgloopanal.c
@@ -112,8 +112,8 @@ blocks_invariant_registers (basic_block *bbs, int nbbs, regset regs)
for (i = 0; i < max_reg_num (); i++)
SET_REGNO_REG_SET (regs, i);
for (i = 0; i < nbbs; i++)
- for (insn = bbs[i]->head;
- insn != NEXT_INSN (bbs[i]->end);
+ for (insn = BB_HEAD (bbs[i]);
+ insn != NEXT_INSN (BB_END (bbs[i]));
insn = NEXT_INSN (insn))
if (INSN_P (insn))
note_stores (PATTERN (insn),
@@ -157,8 +157,8 @@ blocks_single_set_registers (basic_block *bbs, int nbbs, rtx *regs)
regs[i] = NULL;
for (i = 0; i < nbbs; i++)
- for (insn = bbs[i]->head;
- insn != NEXT_INSN (bbs[i]->end);
+ for (insn = BB_HEAD (bbs[i]);
+ insn != NEXT_INSN (BB_END (bbs[i]));
insn = NEXT_INSN (insn))
{
rtx set = single_set (insn);
@@ -171,8 +171,8 @@ blocks_single_set_registers (basic_block *bbs, int nbbs, rtx *regs)
data.regs = regs;
for (i = 0; i < nbbs; i++)
- for (insn = bbs[i]->head;
- insn != NEXT_INSN (bbs[i]->end);
+ for (insn = BB_HEAD (bbs[i]);
+ insn != NEXT_INSN (BB_END (bbs[i]));
insn = NEXT_INSN (insn))
{
if (!INSN_P (insn))
@@ -360,12 +360,12 @@ simple_increment (struct loops *loops, struct loop *loop,
if (mod_bb1 == mod_bb)
{
for (;
- mod_insn != PREV_INSN (mod_bb->head);
+ mod_insn != PREV_INSN (BB_HEAD (mod_bb));
mod_insn = PREV_INSN (mod_insn))
if (mod_insn == mod_insn1)
break;
- if (mod_insn == PREV_INSN (mod_bb->head))
+ if (mod_insn == PREV_INSN (BB_HEAD (mod_bb)))
return NULL;
}
@@ -416,7 +416,7 @@ variable_initial_value (rtx insn, regset invariant_regs,
bb = BLOCK_FOR_INSN (insn);
while (1)
{
- for (; insn != bb->head; insn = PREV_INSN (insn))
+ for (; insn != BB_HEAD (bb); insn = PREV_INSN (insn))
{
if (INSN_P (insn))
note_stores (PATTERN (insn),
@@ -426,7 +426,7 @@ variable_initial_value (rtx insn, regset invariant_regs,
break;
}
- if (insn != bb->head)
+ if (insn != BB_HEAD (bb))
{
/* We found place where var is set. */
rtx set_dest;
@@ -471,7 +471,7 @@ variable_initial_value (rtx insn, regset invariant_regs,
return NULL;
bb = bb->pred->src;
- insn = bb->end;
+ insn = BB_END (bb);
}
return NULL;
@@ -496,7 +496,7 @@ variable_initial_values (edge e, rtx var, enum machine_mode inner_mode)
if (e->src == ENTRY_BLOCK_PTR)
return list;
- set_insn = e->src->end;
+ set_insn = BB_END (e->src);
while (REG_P (var)
&& (var = variable_initial_value (set_insn, invariant_regs, var,
&set_insn, inner_mode)))
@@ -983,7 +983,7 @@ simple_loop_exit_p (struct loops *loops, struct loop *loop, edge exit_edge,
return false;
/* It must end in a simple conditional jump. */
- if (!any_condjump_p (exit_bb->end))
+ if (!any_condjump_p (BB_END (exit_bb)))
return false;
ei = exit_bb->succ;
@@ -995,7 +995,7 @@ simple_loop_exit_p (struct loops *loops, struct loop *loop, edge exit_edge,
/* Condition must be a simple comparison in that one of operands
is register and the other one is invariant. */
- if (!(condition = get_condition (exit_bb->end, NULL, false)))
+ if (!(condition = get_condition (BB_END (exit_bb), NULL, false)))
return false;
if (!simple_condition_p (loop, condition, invariant_regs, desc))
@@ -1323,7 +1323,7 @@ num_loop_insns (struct loop *loop)
{
bb = bbs[i];
ninsns++;
- 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))
ninsns++;
}
@@ -1347,7 +1347,7 @@ average_num_loop_insns (struct loop *loop)
bb = bbs[i];
binsns = 1;
- 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))
binsns++;