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: Sun, 26 Jun 2011 20:03:00 -0000 [thread overview]
Message-ID: <BANLkTimiQLH+=0QJV8ELx+6s_NXKaKPv_g@mail.gmail.com> (raw)
In-Reply-To: <4E03B658.8020509@redhat.com>
2011/6/24 Richard Henderson <rth@redhat.com>:
> On 06/23/2011 01:15 PM, Denis Chertykov wrote:
>>> text data bss dec hex filename
>>> 10032 25 0 10057 2749 bld-avr-orig/gcc/z.o
>>> 5816 25 0 5841 16d1 bld-avr-new/gcc/z.o
>>
>> Richard, can you send me this z.c file ?
>> Right now I'm notice that new code is worse.
>
> That's gcc.c-torture/compile/950612-1.c.
>
I have founded that postreload optimizations can't handle results of
new L_R_A code.
I think that it's can be handled by CSE (postreload).
This is a fragment from 950612-1.c:
---------- you can skip it I have a short version below -------
(insn 5186 23 5187 2 (set (reg:HI 30 r30)
(const_int 128 [0x80])) c950612-1.c:20 9 {*movhi}
(nil))
(insn 5187 5186 5189 2 (set (reg:HI 30 r30)
(plus:HI (reg:HI 30 r30)
(reg/f:HI 28 r28))) c950612-1.c:20 21 {*addhi3}
(expr_list:REG_EQUIV (plus:HI (reg/f:HI 28 r28)
(const_int 128 [0x80]))
(nil)))
(insn 5189 5187 2451 2 (set (mem/c:HI (plus:HI (reg:HI 30 r30)
(const_int 1 [0x1])) [8 %sfp+129 S2 A8])
(reg:HI 18 r18)) c950612-1.c:20 9 {*movhi}
(nil))
(note 2451 5189 2537 2 NOTE_INSN_DELETED)
(note 2537 2451 1651 2 NOTE_INSN_DELETED)
(note 1651 2537 3180 2 NOTE_INSN_DELETED)
(note 3180 1651 5191 2 NOTE_INSN_DELETED)
(insn 5191 3180 5192 2 (set (reg:HI 30 r30)
(const_int 128 [0x80])) c950612-1.c:132 9 {*movhi}
(nil))
(insn 5192 5191 5071 2 (set (reg:HI 30 r30)
(plus:HI (reg:HI 30 r30)
(reg/f:HI 28 r28))) c950612-1.c:132 21 {*addhi3}
(expr_list:REG_EQUIV (plus:HI (reg/f:HI 28 r28)
(const_int 128 [0x80]))
(nil)))
(insn 5071 5192 5073 2 (set (mem/c:HI (plus:HI (reg:HI 30 r30)
(const_int 3 [0x3])) [8 %sfp+131 S2 A8])
(reg/v/f:HI 8 r8 [orig:211 pc ] [211])) c950612-1.c:132 9 {*movhi}
(nil))
------------------------------------------------------
Insns 5186,5187 equal to 5191,5192 and 5191,5192 can be removed, but
reload_cse_regs_1 operate only on one insn.
5186 Z=128
5187 Z=Y+128 ; REG_EQUIV Z=Y+128
5189 HI:[Z+1]=HI:R18
...(deleted insns)
5191 Z=128
5192 Z=Y+128 ; REG_EQUIV Z=Y+128
(5191,5192) really a one three addressing add Z=Y+128.
Insns (5191,5192) exists because AVR havn't 3 addressing add.
Insn 5191 destroy REG_EQUIV (it's right), but reload_cse_regs_1 can't
optimize insns 5191,5192.
Right now I have only one idea:
1. create peephole2 for joining such insns (5191,5192);
2. inside machine dependent pass rerun postreload and may be gcse2;
3. split joined insns to originals.
Denis.
next prev parent reply other threads:[~2011-06-26 18:51 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 [this message]
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='BANLkTimiQLH+=0QJV8ELx+6s_NXKaKPv_g@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).