From: Denis Chertykov <chertykov@gmail.com>
To: Georg-Johann Lay <avr@gjlay.de>
Cc: Richard Henderson <rth@redhat.com>,
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, 07 Jul 2011 18:21:00 -0000 [thread overview]
Message-ID: <CADOs=zYM_OJhno-YWJ2VAf7=MSunRG+AySq1SSprwh7=BAwpig@mail.gmail.com> (raw)
In-Reply-To: <4E157B72.1000304@gjlay.de>
2011/7/7 Georg-Johann Lay <avr@gjlay.de>:
> Denis Chertykov wrote:
>> 2011/6/27 Georg-Johann Lay:
>>> Denis Chertykov wrote:
>
>>>> The main problem for me is that the new addressing mode produce a
>>>> worse code in many tests.
>>> You have an example source?
>>
>> In attachment.
>>
>> Denis.
>
> Hi Denis.
>
> I had a look at the sources you sent.
>
> sort.c:
> =======
>
> There is some difference because of register allocation, but the new
> code does not look awfully bad, just a bit different because of
> different register allocation that might need some more bytes.
>
> The difference is *not* because of deny fake X addressing, it's
> because of the new avr_hard_regno_mode_ok implementation to fix
> PR46779. When I add
>
>
> if (GET_MODE_SIZE (mode) == 1)
> return 1;
>
> + if (SImode == mode && regno == 28)
> + return 0;
>
> return regno % 2 == 0;
>
> to that function, the difference in code disappears.
>
I have attached my version of addressing experiments.
(on rietveld http://codereview.appspot.com/4674046/)
It's against Richard's git://gcc.gnu.org/git/gcc.git rth/avr-addressing
(may be you compare my regressions with your. It's interesting.)
I still have a regression for sort.c (but I didn't analyzed the code):
text data bss dec hex filename
364 0 0 364 16c /tmp/svn.o
446 0 0 446 1be /tmp/addr.o
> pr.c:
> =====
>
> I get the following sizes with pr-0 the original compile and pr qith
> my patch:
>
>>avr-size pr-0.o
> text data bss dec hex filename
> 2824 24 0 2848 b20 pr-0.o
>>avr-size pr.o
> text data bss dec hex filename
> 2564 24 0 2588 a1c pr.o
>
> So the size actually decreased significantly. Avoiding SI in
> avr_hard_regno_mode_ok like above does not change code size.
Right now I'm also has a win for pr.c with new addressing code:
text data bss dec hex filename
1226 24 0 1250 4e2 /tmp/svn.o
1176 24 0 1200 4b0 /tmp/addr.o
But, from time to time (while experimenting) regression was here.
>
> ============
>
> Note that I did *not* use the version from the git repository; I could
> not get reasonable code out of it (even after some fixes). Hundreds
> of testsuite crashes...
IMHO it's because of `avr_frame_pointer_required_p' and `avr_can_eliminate'.
(look at my attached patch)
>
> I used the initial patch that I posted; I attached it again for
> reference. Note that LEGITIMIZE_RELOAD_ADDRESS is still not
> implemented there.
I think you can copy it from rth/addressing.
>
> ============
>
> Did you decide about the fix for PR46779?
>
> http://gcc.gnu.org/ml/gcc-patches/2011-06/msg00810.html
>
> Is it ok to commit?
I forgot about testsuite regressions for this patch.
Denis.
next prev parent reply other threads:[~2011-07-07 18:15 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
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 [this message]
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='CADOs=zYM_OJhno-YWJ2VAf7=MSunRG+AySq1SSprwh7=BAwpig@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).