From: Denis Chertykov <chertykov@gmail.com>
To: Richard Henderson <rth@redhat.com>
Cc: Georg-Johann Lay <avr@gjlay.de>,
gcc-patches@gcc.gnu.org, Anatoly Sokolov <aesok@post.ru>,
"Eric B. Weddington" <eric.weddington@atmel.com>
Subject: Re: [Patch, AVR]: Fix PR46779
Date: Thu, 16 Jun 2011 18:57:00 -0000 [thread overview]
Message-ID: <BANLkTikrbhK75q__nVK6e1fFOAfQMN=AVA@mail.gmail.com> (raw)
In-Reply-To: <4DFA124F.1090504@redhat.com>
2011/6/16 Richard Henderson <rth@redhat.com>:
> On 06/16/2011 04:34 AM, Denis Chertykov wrote:
>> @rth (while you are diving into AVR microworld ;-)
>> May be you can give a suggestion to change the AVR abi.
>> I have tuned the abi for code size almost 13 years ago.
>> The register pressure to r18-r31 are very high.
>
> As far as I can see, the ABI is pretty good. There's nothing
> that I would say that should obviously be changed.
>
> I might totally drop support for DImode. Let "long long" map
> to SImode. If you want 64-bit data, you probably don't want
> to select an 8-bit microcontroller.
>
> That might take a bit of surgery on the way we currently build
> libgcc though.
>
>> I have a set of experiments with omitting the frame poiner and I found that
>> better to support fake addressing modes (infinite displacement for frame
>> pointer).
>
> The biggest problem that I see, from the 950612-1.c test case
> with the current handling of the "infinite displacement frame
> pointer", is that the adjustments to the frame pointer are
> never exposed as separate instructions, so there's never a
> chance to optimize them.
Yes. I'm agree.
> So once you build a stack frame larger than 64 bytes, things
> get worse and worse.
May be something like this:
The port must not permit infinite displacements before reload.
(all addressing modes must have a right form)
Fake addressing mode enabled only after reload_in_progress.
(only small part of spilled/local variables will be addressed by
fake addressing mode.)
I don't like fake addressing mode and I don't want to support it at
all, but may be it's a best way to work around 'unable to find a
register to spill' problem. (the current AVR addressing code written
in this way)
> You wind up with code like
>
> subi r28,lo8(-133)
> sbci r29,hi8(-133)
> ld r18,Y
> subi r28,lo8(133)
> sbci r29,hi8(133)
> subi r28,lo8(-134)
> sbci r29,hi8(-134)
> ld r19,Y
> subi r28,lo8(134)
> sbci r29,hi8(134)
>
> where obviously the 4 middle instructions could be eliminated.
>
> If we came out of reload (or shortly thereafter via split) with
> these as separate patterns, we might be able to eliminate them
> via an existing optimization pass. OTOH, an existing pass might
> refuse to operate on the frame pointer because the frame pointer
> is usually Special.
IMHO the source of the problem is a REGISTER ALLOCATOR because it is
not handle a register elimination and strict insn constraints.
Denis.
next prev parent reply other threads:[~2011-06-16 18:10 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-09 17:24 Georg-Johann Lay
2011-06-09 18:50 ` Denis Chertykov
2011-06-09 19:43 ` Georg-Johann Lay
2011-06-09 19:51 ` Denis Chertykov
2011-06-10 10:23 ` Georg-Johann Lay
2011-06-12 10:34 ` Denis Chertykov
2011-06-13 18:10 ` Georg-Johann Lay
2011-06-13 22:37 ` Denis Chertykov
2011-06-14 10:39 ` Georg-Johann Lay
2011-06-14 11:38 ` Denis Chertykov
2011-06-14 21:38 ` Georg-Johann Lay
2011-06-14 23:04 ` Richard Henderson
2011-06-15 17:58 ` Richard Henderson
2011-06-15 21:58 ` Georg-Johann Lay
2011-06-15 22:20 ` Richard Henderson
2011-06-16 3:46 ` Richard Henderson
2011-06-16 11:37 ` Denis Chertykov
2011-06-16 12:01 ` Denis Chertykov
2011-06-16 14:07 ` Richard Henderson
2011-06-16 18:18 ` Denis Chertykov
2011-06-16 18:57 ` Richard Henderson
2011-06-16 19:33 ` Denis Chertykov
2011-06-16 19:42 ` Richard Henderson
2011-06-16 20:04 ` Denis Chertykov
2011-06-16 14:36 ` Richard Henderson
2011-06-16 14:52 ` Bernd Schmidt
2011-06-16 15:13 ` Richard Henderson
2011-06-16 18:57 ` Denis Chertykov [this message]
2011-06-23 20:48 ` Denis Chertykov
2011-06-23 22:04 ` Richard Henderson
2011-06-26 20:03 ` Denis Chertykov
2011-06-26 20:51 ` Georg-Johann Lay
2011-06-27 8:41 ` Denis Chertykov
2011-06-27 9:19 ` Georg-Johann Lay
2011-06-27 10:17 ` Denis Chertykov
2011-07-07 9:59 ` Georg-Johann Lay
2011-07-07 18:21 ` Denis Chertykov
2011-07-08 10:12 ` Georg-Johann Lay
2011-07-08 10:25 ` Denis Chertykov
2011-07-08 12:16 ` Georg-Johann Lay
2011-06-22 3:28 ` Hans-Peter Nilsson
2011-06-22 17:03 ` Georg-Johann Lay
2011-06-23 12:51 ` Hans-Peter Nilsson
2011-06-23 13:00 ` Hans-Peter Nilsson
2011-06-09 20:03 ` Georg-Johann Lay
2011-06-10 9:27 ` Georg-Johann Lay
2011-06-21 17:17 ` Georg-Johann Lay
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='BANLkTikrbhK75q__nVK6e1fFOAfQMN=AVA@mail.gmail.com' \
--to=chertykov@gmail.com \
--cc=aesok@post.ru \
--cc=avr@gjlay.de \
--cc=eric.weddington@atmel.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=rth@redhat.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).