diff options
author | Maxim Kuvyrkov <maxim@codesourcery.com> | 2007-08-22 15:07:10 +0000 |
---|---|---|
committer | Maxim Kuvyrkov <mkuvyrkov@gcc.gnu.org> | 2007-08-22 15:07:10 +0000 |
commit | 1c3d0d93e2b064822db68e22a09e424e9b4abe18 (patch) | |
tree | 04fd8eda25f1831c163b4516b1d3c64f6b57fc22 /gcc/haifa-sched.c | |
parent | f37dc59727f9ef6704c2063e2eef017ae3517cc6 (diff) | |
download | gcc-1c3d0d93e2b064822db68e22a09e424e9b4abe18.tar.gz |
target.h (struct gcc_target.sched: dfa_pre_advance_cycle, [...]): New scheduler hooks.
* target.h (struct gcc_target.sched: dfa_pre_advance_cycle,
dfa_post_advance_cycle): New scheduler hooks.
* target-def.h (TARGET_SCHED_DFA_PRE_ADVANCE_CYCLE,
TARGET_SCHED_DFA_POST_ADVANCE_CYCLE): New macros to initialize
new hooks.
(TARGET_SCHED): Use them.
* doc/tm.texi (TARGET_SCHED_DFA_PRE_ADVANCE_CYCLE,
TARGET_SCHED_DFA_POST_ADVANCE_CYCLE): Document new hooks.
* haifa-sched.c (advance_one_cycle): Invoke new hooks.
* genautomata.c (insn_has_dfa_reservation_p): New DFA interface
function to facilitate debugging.
(INSN_HAS_DFA_RESERVATION_P_FUNC_NAME): New macro.
(output_insn_has_dfa_reservation_p): New static function to output
insn_has_dfa_reservation_p ().
(write_automata): Use it.
* genattr.c (main): Output declaration for
insn_has_dfa_reservation_p ().
From-SVN: r127707
Diffstat (limited to 'gcc/haifa-sched.c')
-rw-r--r-- | gcc/haifa-sched.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c index d9a8f782a64..27b040fa112 100644 --- a/gcc/haifa-sched.c +++ b/gcc/haifa-sched.c @@ -1142,6 +1142,9 @@ adjust_priority (rtx prev) HAIFA_INLINE static void advance_one_cycle (void) { + if (targetm.sched.dfa_pre_advance_cycle) + targetm.sched.dfa_pre_advance_cycle (); + if (targetm.sched.dfa_pre_cycle_insn) state_transition (curr_state, targetm.sched.dfa_pre_cycle_insn ()); @@ -1151,6 +1154,9 @@ advance_one_cycle (void) if (targetm.sched.dfa_post_cycle_insn) state_transition (curr_state, targetm.sched.dfa_post_cycle_insn ()); + + if (targetm.sched.dfa_post_advance_cycle) + targetm.sched.dfa_post_advance_cycle (); } /* Clock at which the previous instruction was issued. */ |