+Tue Sep 23 01:15:50 1997 David S. Miller <davem@tanya.rutgers.edu>
+
+ * 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.
+
Tue Sep 23 00:59:54 1997 Jeffrey A Law (law@cygnus.com)
* rtlanal.c (computed_jump_p): Fix typo in last change.
}
}
}
+
+ /* 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 */
"REG_NONNEG", "REG_NO_CONFLICT", "REG_UNUSED",
"REG_CC_SETTER", "REG_CC_USER", "REG_LABEL",
"REG_DEP_ANTI", "REG_DEP_OUTPUT", "REG_BR_PROB",
- "REG_EXEC_COUNT", "REG_NOALIAS" };
+ "REG_EXEC_COUNT", "REG_NOALIAS", "REG_SAVE_AREA",
+ "REG_BR_PRED" };
/* Allocate an rtx vector of N elements.
Store the length, and initialize all elements to zero. */
probability that this call won't return.
REG_EXEC_COUNT is attached to the first insn of each basic block, and
the first insn after each CALL_INSN. It indicates how many times this
- block was executed. */
+ block was executed.
+ REG_SAVE_AREA is used to optimize rtl generated by dynamic stack
+ allocations for targets where SETJMP_VIA_SAVE_AREA is true.
+ REG_BR_PRED is attached to JUMP_INSNs only, it holds the branch prediction
+ flags computed by get_jump_flags() after dbr scheduling is complete. */
+
#define REG_NOTES(INSN) ((INSN)->fld[6].rtx)
REG_NONNEG = 8, REG_NO_CONFLICT = 9, REG_UNUSED = 10,
REG_CC_SETTER = 11, REG_CC_USER = 12, REG_LABEL = 13,
REG_DEP_ANTI = 14, REG_DEP_OUTPUT = 15, REG_BR_PROB = 16,
- REG_EXEC_COUNT = 17, REG_NOALIAS = 18 };
+ REG_EXEC_COUNT = 17, REG_NOALIAS = 18, REG_SAVE_AREA = 19,
+ REG_BR_PRED = 20 };
/* The base value for branch probability notes. */
#define REG_BR_PROB_BASE 10000