[Bug rtl-optimization/39871] [4.3/4.4/4.5 regression] Code size increase on ARM due to inferior CSE
steven at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Feb 10 16:28:00 GMT 2010
------- Comment #12 from steven at gcc dot gnu dot org 2010-02-10 16:27 -------
Trying with r156650, I get this before regalloc (in the .184r.asmcons dump):
1 NOTE_INSN_DELETED
4 NOTE_INSN_BASIC_BLOCK
2 r135:SI=r0:SI
REG_DEAD: r0:SI
3 NOTE_INSN_FUNCTION_BEG
6 r136:SI=sfp:SI-0xc
7 r137:SI=[r135:SI]
8 [r136:SI+0x4]=r137:SI
REG_DEAD: r137:SI
10 r139:SI=[r135:SI+0x4]
REG_DEAD: r135:SI
11 r0:SI=r136:SI
REG_DEAD: r136:SI
REG_EQUAL: sfp:SI-0xc
12 r1:SI=r139:SI
REG_DEAD: r139:SI
13 call [`func'] argc:0x0
REG_DEAD: r1:SI
REG_DEAD: r0:SI
To get the same code as gcc 4.2.1 of comment #0, r0 should be assigned to r136.
There is no reason why that should not happen, because there are no conflicts:
+++Allocating 32 bytes for conflict table (uncompressed size 32)
;; a0(r139,l0) conflicts: a1(r136,l0)
;; total conflict hard regs: 0
;; conflict hard regs: 0
;; a1(r136,l0) conflicts: a0(r139,l0) a2(r135,l0) a3(r137,l0)
;; total conflict hard regs:
;; conflict hard regs:
;; a2(r135,l0) conflicts: a1(r136,l0) a3(r137,l0)
;; total conflict hard regs:
;; conflict hard regs:
;; a3(r137,l0) conflicts: a1(r136,l0) a2(r135,l0)
;; total conflict hard regs:
;; conflict hard regs:
There are also no indications (not that I can find anyway) in the IRA dumps,
that suggests that IRA notices a tie between r0-r136 and r1-r139 may be
beneficial (thanks to insns 11 and 12 in the pre-regalloc dump).
IRA has done the following:
Popping a0(r139,l0) -- assign reg 1
Popping a1(r136,l0) -- assign reg 3
Popping a2(r135,l0) -- assign reg 0
Popping a3(r137,l0) -- assign reg 2
With this assignment, insn 2 and insn 12 become no-op moves. It looks like r139
ends up in r1 by pure luck, or there would have been another extra move.
After regalloc (in the .187r.ira dump) it looks like this:
1 NOTE_INSN_DELETED
4 NOTE_INSN_BASIC_BLOCK
3 NOTE_INSN_FUNCTION_BEG
6 r3:SI=sp:SI+0x4
REG_EQUIV: sp:SI+0x4
7 r2:SI=[r0:SI]
REG_EQUIV: [r0:SI]
8 [r3:SI+0x4]=r2:SI
10 r1:SI=[r0:SI+0x4]
11 r0:SI=r3:SI
REG_EQUAL: sfp:SI-0xc
13 call [`func'] argc:0x0
16 NOTE_INSN_DELETED
--
steven at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
GCC build triplet|x86_64-unknown-linux-gnu |
GCC host triplet|x86_64-unknown-linux-gnu |
Known to fail| |4.4.0 4.5.0
Known to work|4.5.0 |4.2.1
Last reconfirmed|2009-05-20 14:17:16 |2010-02-10 16:27:56
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39871
More information about the Gcc-bugs
mailing list