From: Segher Boessenkool <segher@kernel.crashing.org>
To: William Tambe <tambewilliam@gmail.com>
Cc: gcc-help <gcc-help@gcc.gnu.org>
Subject: Re: Make GCC move instructions between a multi-cycle instruction and the next instruction that depends on its result.
Date: Tue, 22 Feb 2022 18:22:53 -0600 [thread overview]
Message-ID: <20220223002253.GB614@gate.crashing.org> (raw)
In-Reply-To: <CAF8i9mM34-mLZoh4DrKbLsRNSR=S24zB39heVwv5MsxWjcWsiQ@mail.gmail.com>
On Tue, Feb 22, 2022 at 03:15:55PM -0600, William Tambe via Gcc-help wrote:
[snip]
> > Without above transformation, `add %4 %7` would cause the cpu to wait
> > on `div %4 %5` when it could have executed instructions that do not
> > depend on the result of "div".
>
> How to implement above transformation such that GCC moves instructions
> between a multi-cycle instruction and the next instruction that
> depends on its result ?
GCC has a pretty advanced instruction scheduler. You can start looking
at <https://gcc.gnu.org/onlinedocs/gccint/Scheduling.html> for example?
Segher
next prev parent reply other threads:[~2022-02-23 0:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-22 19:00 William Tambe
2022-02-22 21:15 ` William Tambe
2022-02-23 0:22 ` Segher Boessenkool [this message]
2022-02-23 0:51 ` William Tambe
2022-02-23 7:25 ` AW: " stefan
2022-02-23 15:07 ` William Tambe
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=20220223002253.GB614@gate.crashing.org \
--to=segher@kernel.crashing.org \
--cc=gcc-help@gcc.gnu.org \
--cc=tambewilliam@gmail.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).