public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: ddmetro <puzzlesdj@gmail.com>
To: gcc@gcc.gnu.org
Subject: help on - writing a testcase to detect structural hazard in gcc
Date: Wed, 28 Oct 2009 18:13:00 -0000	[thread overview]
Message-ID: <26098843.post@talk.nabble.com> (raw)


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.

                 reply	other threads:[~2009-10-28 17:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=26098843.post@talk.nabble.com \
    --to=puzzlesdj@gmail.com \
    --cc=gcc@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).