public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jean Christophe Beyler <jean.christophe.beyler@gmail.com>
To: Paolo Bonzini <paolo.bonzini@gmail.com>
Cc: "gcc@gcc.gnu.org" <gcc@gcc.gnu.org>
Subject: Re: Code optimization only in loops
Date: Mon, 13 Jul 2009 21:30:00 -0000	[thread overview]
Message-ID: <c568a2600907131430k47597fb3u3f1cc94dc2f72421@mail.gmail.com> (raw)
In-Reply-To: <4A320A07.3020804@gmail.com>

Sorry to be coming back to this problem, I'm working on many projects
at the same time at the moment.

The port actually has a shift-immediate. It actually sees it later in
the fwprop pass:

In insn 14, replacing
 (ashift:DI (reg:DI 79)
        (reg:DI 77))
 with (ashift:DI (reg:DI 79)
        (const_int 3 [0x3]))
Changed insn 14
deferring rescan insn with uid = 14.

(not the same numbers but you get the idea). I don't understand why
there is a problem here but it does seem that it is linked to the way
my port handles the calculations of addresses.

Thanks again if you have any ideas, or anything I can do to give
information or ideas,
Jc


On Fri, Jun 12, 2009 at 3:55 AM, Paolo Bonzini<paolo.bonzini@gmail.com> wrote:
> Jean Christophe Beyler wrote:
>>
>> I've gone back to this problem (since I've solved another one ;-)).
>> And I've moved forward a bit:
>>
>> It seems that if I consider an array of characters, there are no
>> longer any shifts and therefore I do get my two loads with the use of
>> an offset:
>
> The reason there are shifts instead of multiplies is that multiplications
> are canonicalized to shifts whenever possible outside addresses, because a
> shift instruction should be more efficient.
>
> The interesting dump should be fwprop which is where the address generation
> happens.
>
> From your dumps, however, the problem seems to be that you do not have a
> shift-by-immediate instruction.  You may consider adding it even though it
> does not apply to your assembly, either with define_insn_and_split or by
> loosening the predicate and keeping a "r" constraint (or whatever you're
> using now).
>
> Paolo
>

      reply	other threads:[~2009-07-13 21:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-07 20:46 Jean Christophe Beyler
2009-05-08 11:40 ` Paolo Bonzini
2009-05-14  2:11   ` Jean Christophe Beyler
2009-06-11 20:55     ` Jean Christophe Beyler
2009-06-12  7:56       ` Paolo Bonzini
2009-07-13 21:30         ` Jean Christophe Beyler [this message]

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=c568a2600907131430k47597fb3u3f1cc94dc2f72421@mail.gmail.com \
    --to=jean.christophe.beyler@gmail.com \
    --cc=gcc@gcc.gnu.org \
    --cc=paolo.bonzini@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).