[Bug rtl-optimization/39871] [4.3/4.4/4.5 regression] Code size increase on ARM due to poor register allocation
steven at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Feb 10 19:25:00 GMT 2010
------- Comment #15 from steven at gcc dot gnu dot org 2010-02-10 19:24 -------
The difference between r118474 (left) and r118475 just before register
allocation (in the .life2 dumps) is this:
2 NOTE_INSN_DELETED 2 NOTE_INSN_DELETED
8 NOTE_INSN_BASIC_BLOCK 8 NOTE_INSN_BASIC_BLOCK
6 r101:SI=r0:SI 6 r101:SI=r0:SI
REG_DEAD: r0:SI REG_DEAD: r0:SI
7 NOTE_INSN_FUNCTION_BEG 7 NOTE_INSN_FUNCTION_BEG
11 r102:SI=sfp:SI-0xc 11 r102:SI=sfp:SI-0xc
12 r103:SI=[r101:SI] 12 r103:SI=[r101:SI]
13 [sfp:SI-0x8]=r103:SI | 13 [r102:SI+0x4]=r103:SI
REG_DEAD: r103:SI REG_DEAD: r103:SI
16 r105:SI=[r101:SI+0x4] 16 r105:SI=[r101:SI+0x4]
REG_DEAD: r101:SI REG_DEAD: r101:SI
17 r0:SI=r102:SI 17 r0:SI=r102:SI
REG_DEAD: r102:SI REG_DEAD: r102:SI
REG_EQUAL: sfp:SI-0xc REG_EQUAL: sfp:SI-0xc
18 r1:SI=r105:SI 18 r1:SI=r105:SI
REG_DEAD: r105:SI REG_DEAD: r105:SI
19 call [`func'] argc:0x0 19 call [`func'] argc:0x0
REG_DEAD: r0:SI REG_DEAD: r0:SI
REG_DEAD: r1:SI REG_DEAD: r1:SI
REG_UNUSED: lr:SI REG_UNUSED: lr:SI
20 NOTE_INSN_FUNCTION_END 20 NOTE_INSN_FUNCTION_END
In r118474 the cse1 pass transforms the code on the left (.jump dump) to the
code on the right (.cse1 dump):
11 r102:SI=sfp:SI-0xc 11 r102:SI=sfp:SI-0xc
12 r103:SI=[r101:SI] 12 r103:SI=[r101:SI]
13 [r102:SI+0x4]=r103:SI | 13 [sfp:SI-0x8]=r103:SI
apparently noticing that "sfp-0xc+0x4" == "sfp-0x8". It would be interesting to
know why fwprop is not doing this transformation.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39871
More information about the Gcc-bugs
mailing list