public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* help on - writing a testcase to detect structural hazard in gcc
@ 2009-10-28 18:13 ddmetro
  0 siblings, 0 replies; only message in thread
From: ddmetro @ 2009-10-28 18:13 UTC (permalink / raw)
  To: gcc


Hi All,
       Our project is to optimize instruction scheduling in gcc by detecting
structural hazards. We looked at the current dfa
implementation(gen-automata.c and insn-automata.c). We are trying to come up
with a test case for the same, a scenario wherein one of the instructions is
stalled due to the resource being used by some other instruction. However,
we are unable to do so.

1. We wrote a C program - doing - floating point multiplications, divisions
and additions. However in both the files - 'progname.s' file and
'progname.c.190r.sched2' file, the instructions were scheduled for execution
in sequential order. We couldn't find a way to detect a stall, by looking at
the assembly code generated.
Question: How do we detect that a stall has occurred if execution is being
carried out in a particular sequence?
Also we would like to know of a tool, which given a 'progname.s' file, gives
details of the execution time of each instruction and the clock cycle in
which stall will occur, if execution is carried out in this sequence.

2. We saw that integer operations were already being performed during
compilation. Hence we were left with only floating point operations to be
looked into for structural hazards. 
Question: Once a stall is detected in case of floating point unit being used
currently by some other instruction, which instruction can be scheduled in
so as to avoid this stall(since integer operations are performed at compile
time and floating point units are being used)?

Target machine architecture: 686
Working on: Intel Pentium Dual Core processor

Thanking you,
Dhiraj
-- 
View this message in context: http://www.nabble.com/help-on---writing-a-testcase-to-detect-structural-hazard-in-gcc-tp26098843p26098843.html
Sent from the gcc - Dev mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-10-28 17:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-28 18:13 help on - writing a testcase to detect structural hazard in gcc ddmetro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).