public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@dm.cobaltmicro.com>
To: law@cygnus.com
Cc: amylaar@cygnus.co.uk, egcs@cygnus.com
Subject: Re: some Sparc hackery in the works
Date: Mon, 13 Jul 1998 23:48:00 -0000	[thread overview]
Message-ID: <199807140425.VAA21575@dm.cobaltmicro.com> (raw)
In-Reply-To: <14248.900388117@hurl.cygnus.com>

   Date: Mon, 13 Jul 1998 21:48:37 -0600
   From: Jeffrey A Law <law@hurl.cygnus.com>

     In message < 199807131854.TAA18918@phal.cygnus.co.uk >you write:
     > You usually get worse code if you try to open-code DImode operations as
     > RTL at rtl generation time.

   This depends on numerous factors, including but not limited to how many
   registers the target has and how important scheduling is for good performance
   on the target.

     > You can get the same benefit for scheduling and delay slot filling if you
     > povide define_splits for the patterns in question; you can then also
     > safe the output template by replacing it with a '#', to indicate that
     > this pattern must be split.

   Not necessarily since you lose optimizations done by various other
   optimizers.  For example, the sub-parts of a DImode load become
   candidates for CSE, GCSE, combine, local alloc, etc.

   There's generally some tradeoff for each direction.  We should trust
   David to do the right thing for the sparc port.

There is a 3rd issue.  If you open code it early, you risk ending up
with a multi-insn output in the end.  The reason is fundamentally
because some bits of information (odd/even DI mode register alignment,
and actual address alignment for MEM moves) pop up near the end of
code gen depending upon what register allocators do (and subsequently
what stack slots go to which items etc.).  There is also an issue with
argument passing semantics of DI mode objects on 32-bit targets.

Look at my code for the movdi sequences and splits very carefully.  I
tried many combinations and approaches, and this was the first which
reliably gave me perfect 1<-->1 insn output in the end.

Some of my early open coding attempts caused many situations where at
the end, in the define_insn's, I had to detect the bad register number
of address alignment cases and fix it up.  This was bad and defeated
the purpose of the goals I had in mind.

Thus I made everything a post-reload split... oh, always keep in mind
that all these move patterns are "special" anyways due to reload.

   ps.  Much of Dave's work mirrors stuff rth and myself have discussed
   as important to handle better on the sparc port.

BTW, during my work I noticed how much tha PA port is derived from or
influenced by the Sparc stuff, perhaps you can easily steal some of my
tricks and techniques ;-)

Later,
David S. Miller
davem@dm.cobaltmicro.com

  reply	other threads:[~1998-07-13 23:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-07-13  4:36 David S. Miller
1998-07-13 12:58 ` Joern Rennecke
1998-07-13 16:44   ` David S. Miller
1998-07-13 20:56   ` Michael Hayes
1998-07-13 21:47   ` Jeffrey A Law
1998-07-13 23:48     ` David S. Miller [this message]
1998-07-13 21:47       ` Jeffrey A Law
1998-07-13 21:47 ` Jeffrey A Law

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=199807140425.VAA21575@dm.cobaltmicro.com \
    --to=davem@dm.cobaltmicro.com \
    --cc=amylaar@cygnus.co.uk \
    --cc=egcs@cygnus.com \
    --cc=law@cygnus.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).