From: William Tambe <tambewilliam@gmail.com>
To: Segher Boessenkool <segher@kernel.crashing.org>
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:51:22 -0600 [thread overview]
Message-ID: <CAF8i9mO_OcKPgMoW4DNOn_NVQXP5UQ8vSz0D8MuK8UopFEvkXA@mail.gmail.com> (raw)
In-Reply-To: <20220223002253.GB614@gate.crashing.org>
On Tue, Feb 22, 2022 at 6:24 PM Segher Boessenkool
<segher@kernel.crashing.org> wrote:
>
> 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?
>
Thank you for the pointer; could you suggest an existing example close
to what I am looking to implement that uses above TARGET_SCHED_* hooks
?
>
> Segher
next prev parent reply other threads:[~2022-02-23 0:51 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
2022-02-23 0:51 ` William Tambe [this message]
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=CAF8i9mO_OcKPgMoW4DNOn_NVQXP5UQ8vSz0D8MuK8UopFEvkXA@mail.gmail.com \
--to=tambewilliam@gmail.com \
--cc=gcc-help@gcc.gnu.org \
--cc=segher@kernel.crashing.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).