reorg.c (dbr_schedule): At end of this pass...
* 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. From-SVN: r15670
This commit is contained in:
parent
5cd278f399
commit
c107334d5c
|
@ -1,3 +1,10 @@
|
||||||
|
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)
|
Tue Sep 23 00:59:54 1997 Jeffrey A Law (law@cygnus.com)
|
||||||
|
|
||||||
* rtlanal.c (computed_jump_p): Fix typo in last change.
|
* rtlanal.c (computed_jump_p): Fix typo in last change.
|
||||||
|
|
17
gcc/reorg.c
17
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 */
|
#endif /* DELAY_SLOTS */
|
||||||
|
|
|
@ -181,7 +181,8 @@ char *reg_note_name[] = { "", "REG_DEAD", "REG_INC", "REG_EQUIV", "REG_WAS_0",
|
||||||
"REG_NONNEG", "REG_NO_CONFLICT", "REG_UNUSED",
|
"REG_NONNEG", "REG_NO_CONFLICT", "REG_UNUSED",
|
||||||
"REG_CC_SETTER", "REG_CC_USER", "REG_LABEL",
|
"REG_CC_SETTER", "REG_CC_USER", "REG_LABEL",
|
||||||
"REG_DEP_ANTI", "REG_DEP_OUTPUT", "REG_BR_PROB",
|
"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.
|
/* Allocate an rtx vector of N elements.
|
||||||
Store the length, and initialize all elements to zero. */
|
Store the length, and initialize all elements to zero. */
|
||||||
|
|
10
gcc/rtl.h
10
gcc/rtl.h
|
@ -307,7 +307,12 @@ typedef struct rtvec_def{
|
||||||
probability that this call won't return.
|
probability that this call won't return.
|
||||||
REG_EXEC_COUNT is attached to the first insn of each basic block, and
|
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
|
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)
|
#define REG_NOTES(INSN) ((INSN)->fld[6].rtx)
|
||||||
|
|
||||||
|
@ -317,7 +322,8 @@ enum reg_note { REG_DEAD = 1, REG_INC = 2, REG_EQUIV = 3, REG_WAS_0 = 4,
|
||||||
REG_NONNEG = 8, REG_NO_CONFLICT = 9, REG_UNUSED = 10,
|
REG_NONNEG = 8, REG_NO_CONFLICT = 9, REG_UNUSED = 10,
|
||||||
REG_CC_SETTER = 11, REG_CC_USER = 12, REG_LABEL = 13,
|
REG_CC_SETTER = 11, REG_CC_USER = 12, REG_LABEL = 13,
|
||||||
REG_DEP_ANTI = 14, REG_DEP_OUTPUT = 15, REG_BR_PROB = 16,
|
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. */
|
/* The base value for branch probability notes. */
|
||||||
#define REG_BR_PROB_BASE 10000
|
#define REG_BR_PROB_BASE 10000
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue