public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: <tm_gccmail@mail.kloo.net>
To: Jan Hoogerbrugge <hoogerbrugge@hotmail.com>
Cc: gcc@gcc.gnu.org
Subject: Re: Transformations to increase parallelism (peepholes?)
Date: Thu, 24 Jul 2003 21:12:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.21.0307241241060.12901-100000@mail.kloo.net> (raw)
In-Reply-To: <BAY9-F478wSA1XvpFVj00000b00@hotmail.com>

On Wed, 23 Jul 2003, Jan Hoogerbrugge wrote:
> Would it be possible to do (some of) these transformations by means of 
> peepholes in the .md file? If so, could somebody tell me how a peephole 
> should look like for
> 
>    reg1 = reg2 + const1
>    reg3 = reg1 + const2
> 
> to
> 
>    reg1 = reg2 + const1
>    reg3 = reg2 + (const1 + const2)
> 
> where const1 + const2 has to be within certain bounds. It tried to write a 
> peephole for this but without success. Who helps?
> 
> Cheers,
> Jan

You can't treat GCC like a black box and expect this to work.

You need to use GDB and debug the peephole optimizer and figure out why
your pattern isn't matching. You can use the "call" command and use it
with debug_rtx() to debug the peephole optimizer.

You probably don't want to do this with the peephole optimizer, since it
runs after both instruction scheduling passes. You probably want to use
peephole2 instead.

 Toshi


  reply	other threads:[~2003-07-24 19:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-23 16:03 Jan Hoogerbrugge
2003-07-24 21:12 ` tm_gccmail [this message]
2003-08-01 20:46 ` tm_gccmail

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=Pine.LNX.4.21.0307241241060.12901-100000@mail.kloo.net \
    --to=tm_gccmail@mail.kloo.net \
    --cc=gcc@gcc.gnu.org \
    --cc=hoogerbrugge@hotmail.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).