From: Boris Boesler <baembel@gmx.de>
To: gcc-help@gcc.gnu.org
Cc: Ian Lance Taylor <iant@google.com>
Subject: Re: Scheduling and inserting NOPs
Date: Wed, 21 Nov 2007 17:08:00 -0000 [thread overview]
Message-ID: <0C1BDE03-38B6-42E0-90CE-FBA217F6A5DF@gmx.de> (raw)
In-Reply-To: <m3r6irv506.fsf@localhost.localdomain>
Hi!
> In my earlier message I explained what people do today for processors
> which need NOP instructions to be inserted.
>
> Nobody is working on implementing a better approach.
I had a small discussion with Ian, which showed that my problem is
not understood. I try to summarize my previous emails:
I have a processor with a 6 stages pipeline. Every stage is used
for exactly one cycle. This means:
1) there can never be a hardware structural hazard (that's good)
2) scheduling is not needed (even better)
So what's the problem? The problem is that there are 2 stage which
can read registers and there is no bypass/result-forwarding from the
register-write-back to the first register-read-stage.
The following program is correct on my processor (pseudo-code):
A0 := &a
A0 := &b
NOP
A1 := 1;
A2 := (A0) + A1 ; contents of memory at label a plus 1
A3 := (A0) + A1 ; contents of memory at label b plus 1
There has to be a number of instructions (e.g. NOPs) between
writing the address-register A0 and reading it for indirect memory-
access. To solve this I need scheduling. I implemented the scheduler
specification including its bypasses. The code is scheduled
correctly, as I can see in the verbose output. The missing/empty
cycles are visible - but empty.
Now I need a pass to insert the missing NOPs. The approach Ian
mentioned with the DFA-simulator does not work, because the simulator
detects structural hardware hazards only (see http://www.nabble.com/Re
%3A-Question-of-the-DFA-scheduler-p603486.html), which can not occur
in my processor. Or did the DFA change?
NOP-insertion could be done in the hook TARGET_SCHED_REORDER with a
little bit of book-keeping the cycles, but in this hook no code can
be added.
In the thread above the ia64 port is mentioned, I have to check
that. But isn't there a simple solution to insert NOPs?
Boris
next prev parent reply other threads:[~2007-11-21 16:58 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-12 18:59 Boris Boesler
2007-11-13 18:18 ` Ian Lance Taylor
2007-11-13 20:51 ` Boris Boesler
2007-11-14 15:11 ` Ian Lance Taylor
2007-11-15 14:28 ` Boris Boesler
2007-11-15 17:34 ` Ian Lance Taylor
2007-11-21 17:08 ` Boris Boesler [this message]
2007-11-21 17:26 ` Andrew Haley
2007-11-21 17:32 ` Boris Boesler
2007-11-21 17:39 ` Andrew Haley
2007-11-21 17:54 ` Andrew Haley
2007-11-21 18:15 ` Boris Boesler
2007-11-22 17:16 ` Andrew Haley
2007-11-22 17:19 ` Boris Boesler
2007-11-22 18:54 ` Andrew Haley
2007-11-21 18:32 ` Ian Lance Taylor
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=0C1BDE03-38B6-42E0-90CE-FBA217F6A5DF@gmx.de \
--to=baembel@gmx.de \
--cc=gcc-help@gcc.gnu.org \
--cc=iant@google.com \
/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).