This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Hi,
This mail is related to the recombination of address arithmetic insns
generated by DFmode splits after reload. The attached patch addresses
PR 5360. Patch needs some improvement, but I would like to know the
viewpoint on applied strategy. The previous discussion of the problem
is available on the following thread:
http://gcc.gnu.org/ml/gcc/2003-12/msg00700.html
Toshi suggested that try_split () should have recombination
mechanism for combining split insns with the current instruction
stream. But as Jim Wilson says, it won't be that useful
for many targets. The problem seems to be more acute for SH4.
So, I thought, it might be a good idea to fix this problem in a
target dependent manner.
I have prepared a target dependent patch for SH4, attached with
the mail. When any DFmode Load/Store insn in split (in flow2), the
address arithmetic insn is recorded in an array. A marker
(UNSPECV_DF_SPLIT) is put in the insn stream on first split.
Then, in peep2 pass, these address arithmetic insns are recombined
with other ADD incsns in the same basic block if possible. The care
has been taken of deleted insns and blocks during flow2 pass. Following
is the overview of changes made:
config/sh/sh.c (fix_df_splits) : New function
(try_recombine) : New function
(split_array, split_index) : New variables defined
config/sh/sh.md : New define_peephole2
: Modifications in define_split for DFmode load/store
Here are the size improvements I got through this little patch. The
stress benchmarks are taken from stress-1.17 suite.
Size Gains (with compiler options -O2 -ml -m4)
==============================================
Test-case name GCC 3.4 With patch
%age gain
-------------- ------- ----------
---------
slalom.c 11544 11416
1.11
layer3.i 21840 21488
1.61
map_fog.i 31840 31840
0
revolt.i 6532 6532
0
l3bitstream.i 7104 7072
0.45
navion_aero.i 1664 1664
0
I am seeing some good performance gains as well. Will mail you the results
soon.
Please have a look at the patch and suggest me if it is OK to
work in this direction.
Thanks and Regards,
Rakesh Kumar
Attachment:
patch-df-split-fix
Description: Binary data
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |