From 4816399963ee82660f4e818a049d4f16d09aa64d Mon Sep 17 00:00:00 2001 From: law Date: Tue, 23 Sep 1997 07:14:07 +0000 Subject: * reorg.c (dbr_schedule): At end of this pass, add REG_BR_PRED note holding get_jump_flags() calculation to all JUMP_INSNs. * rtl.h (enum reg_note): New note types REG_BR_PRED and REG_SAVE_AREA. * rtl.c (reg_note_name): Add new note types. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15670 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/reorg.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'gcc/reorg.c') diff --git a/gcc/reorg.c b/gcc/reorg.c index 3686907ded4..28553e6583d 100644 --- a/gcc/reorg.c +++ b/gcc/reorg.c @@ -4617,5 +4617,22 @@ dbr_schedule (first, file) } } } + + /* For all JUMP insns, fill in branch prediction notes, so that during + assembler output a target can set branch prediction bits in the code. + We have to do this now, as up until this point the destinations of + JUMPS can be moved around and changed, but past right here that cannot + happen. */ + for (insn = first; insn; insn = NEXT_INSN (insn)) + { + int pred_flags; + + if (GET_CODE (insn) != JUMP_INSN) + continue; + + pred_flags = get_jump_flags (insn, JUMP_LABEL (insn)); + REG_NOTES (insn) = gen_rtx (EXPR_LIST, REG_BR_PRED, + GEN_INT (pred_flags), REG_NOTES (insn)); + } } #endif /* DELAY_SLOTS */ -- cgit v1.2.1