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/predict.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/predict.c')
-rw-r--r-- | gcc/predict.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/gcc/predict.c b/gcc/predict.c index 243c814775d..71cab30b605 100644 --- a/gcc/predict.c +++ b/gcc/predict.c @@ -154,9 +154,9 @@ static bool predicted_by_p (basic_block bb, enum br_predictor predictor) { rtx note; - if (!INSN_P (bb->end)) + if (!INSN_P (BB_END (bb))) return false; - for (note = REG_NOTES (bb->end); note; note = XEXP (note, 1)) + for (note = REG_NOTES (BB_END (bb)); note; note = XEXP (note, 1)) if (REG_NOTE_KIND (note) == REG_BR_PRED && INTVAL (XEXP (XEXP (note, 0), 0)) == (int)predictor) return true; @@ -199,7 +199,7 @@ void predict_edge (edge e, enum br_predictor predictor, int probability) { rtx last_insn; - last_insn = e->src->end; + last_insn = BB_END (e->src); /* We can store the branch prediction information only about conditional jumps. */ @@ -445,7 +445,7 @@ estimate_probability (struct loops *loops_info) statements construct loops via "non-loop" constructs in the source language and are better to be handled separately. */ - if (!can_predict_insn_p (bb->end) + if (!can_predict_insn_p (BB_END (bb)) || predicted_by_p (bb, PRED_CONTINUE)) continue; @@ -476,7 +476,7 @@ estimate_probability (struct loops *loops_info) /* Attempt to predict conditional jumps using a number of heuristics. */ FOR_EACH_BB (bb) { - rtx last_insn = bb->end; + rtx last_insn = BB_END (bb); rtx cond, earliest; edge e; @@ -509,7 +509,7 @@ estimate_probability (struct loops *loops_info) is improbable. This is because such calls are often used to signal exceptional situations such as printing error messages. */ - for (insn = e->dest->head; insn != NEXT_INSN (e->dest->end); + for (insn = BB_HEAD (e->dest); insn != NEXT_INSN (BB_END (e->dest)); insn = NEXT_INSN (insn)) if (GET_CODE (insn) == CALL_INSN /* Constant and pure calls are hardly used to signalize @@ -613,10 +613,10 @@ estimate_probability (struct loops *loops_info) /* Attach the combined probability to each conditional jump. */ FOR_EACH_BB (bb) - 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)) && bb->succ->succ_next != NULL) - combine_predictions_for_insn (bb->end, bb); + combine_predictions_for_insn (BB_END (bb), bb); free_dominance_info (post_dominators); free_dominance_info (dominators); @@ -765,7 +765,7 @@ process_note_prediction (basic_block bb, int *heads, /* Now find the edge that leads to our branch and aply the prediction. */ - if (y == last_basic_block || !can_predict_insn_p (BASIC_BLOCK (y)->end)) + if (y == last_basic_block || !can_predict_insn_p (BB_END (BASIC_BLOCK (y)))) return; for (e = BASIC_BLOCK (y)->succ; e; e = e->succ_next) if (e->dest->index >= 0 @@ -790,8 +790,8 @@ process_note_predictions (basic_block bb, int *heads, int was_bb_head = 0; int noreturn_block = 1; - for (insn = bb->end; insn; - was_bb_head |= (insn == bb->head), insn = PREV_INSN (insn)) + for (insn = BB_END (bb); insn; + was_bb_head |= (insn == BB_HEAD (bb)), insn = PREV_INSN (insn)) { if (GET_CODE (insn) != NOTE) { @@ -1105,7 +1105,7 @@ expensive_function_p (int threshold) { rtx insn; - 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 (active_insn_p (insn)) { @@ -1149,7 +1149,7 @@ estimate_bb_frequencies (struct loops *loops) notes. */ FOR_EACH_BB (bb) { - rtx last_insn = bb->end; + rtx last_insn = BB_END (bb); if (!can_predict_insn_p (last_insn)) { |