This is the mail archive of the gcc-patches@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]

Re: copy_loop_headers patch disappeared?!


Dear Jan, Richard, others,

I wonder what is your opinion about this issue? I would like to remind that this small patch (which was removed on Wed Mar 5 15:45:40 CET 2003 Jan Hubicka <jh@suse.cz>)
brought 2% on our testbed, and I kindly ask you to consider it once more.


Thanks,
  Arpad Beszedes.


Arpad Beszedes wrote:
As disucssed with Richard, it may or may not increase the code size
as copying leads to better optimization of loops.  It looks like it is a
loss overall.


We performed a number of measurements on GCC's testsuite to compare the effect of this patch. We used all testcases (apart from those that expectedly fail compilation), compiled them with the best switches for size (including -Os) using snapshot 20030310 for target arm-elf. We repeated the same using the same snapshot with the added modification "&& !optimize_size". We measured the size of the generated code using program "size". The overall results are the following:
- the total size of all objects is 502057 bytes, and 492981 bytes without and with the added "&& !optimize_size", respectively. So, this shows an overall _gain_ of 1,8%.
- of course, in some cases there is loss (the biggest loss was 252 bytes for one testcase, file gcc.c-torture/execute/20021120-1.c)
- the biggest gain was 5312 bytes (file gcc.c-torture/compile/920808-1.c)


We got nearly the same result (around 2%) using our testbed with some well-known programs from SPEC and Mediabench suites.

So I still think that the first version may perform better.

I can send excel charts with the results, if you wish.

Regards,
  Arpad.

Perhaps we may want to limit the size of copied headers more thightly
for -Os...


That sounds reasonable, too.




-- ****************************************************************** * Arpad Beszedes - researcher * * * * Research Group on Artificial Intelligence - RGAI * * Hungarian Academy of Sciences & University of Szeged, Hungary * * e-mail: beszedes@cc.u-szeged.hu * * web: http://www.inf.u-szeged.hu/~beszedes * * tel.: (+36) 62 544145 * ******************************************************************


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]