This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Question of the DFA scheduler
- From: Richard Sandiford <richard at codesourcery dot com>
- To: "Ling-hua Tseng" <uranus at it dot muds dot net>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Thu, 11 Aug 2005 11:49:47 +0100
- Subject: Re: Question of the DFA scheduler
- References: <000301c59e09$70d79cc0$0201a8c0@uranus>
"Ling-hua Tseng" <uranus@it.muds.net> writes:
> The destination operand of the `sub' instruction, d0, will be written
> back in the 4th cycle, and the instruction `max' will use it as source
> operand (i.e., there is a true data dependency).
>
> I figured out that the state_transition() returns -1 when I issuing
> the `max' instruction, and I figured out it only returns > 0 when
> "hardware structural hazard" occured.
Right. state_transition just checks for unit hazards, not data hazards.
Instruction dependencies are detected by sched-deps.c and stored in the
instructions' LOG_LINKS. insn_latency (in insn-attrtab.c) gives the
latency for two dependent instructions.
Richard