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 all,
> 
> According to the ChangeLog:
> Wed Mar  5 15:45:40 CET 2003  Jan Hubicka  <jh at suse dot cz>
> 	* toplev.c (rest_of_compilation):  Do duplicate loop headers when 
> optimizing for size.
> 
> What was the reason for "&& !optimize_size" to disappear before
> copy_loop_headers call in toplev.c:rest_of_compilation? The difference 
> appeared between snapshots 20030303 and 20030310.

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.
Perhaps we may want to limit the size of copied headers more thightly
for -Os...

Honza
> 
> The original patch was introduced at:
> 2002-10-06  Richard Henderson  <rth at redhat dot com>
> 	PR optimization/2960
> 	* toplev.c (rest_of_compilation): Don't copy_loop_headers if
> 	optimize_size.
> 
> And it prevented duplicate loop condition checking when optimizing for 
> size (although it is faster but the generated code is smaller).
> 
> On our testbed it reduces code size by almost 2%, so I would be happy if 
> it remained the previous version.
> 
> Regards,
>   Arpad Beszedes
> 
> 
> -- 
> ******************************************************************
> *  Arpad Beszedes - researcher                                   *
> *                                                                *
> *  Research Group on Artificial Intelligence - RGAI              *
> *  Hungarian Academy of Sciences & University of Szeged, Hungary *
> *  e-mail: beszedes at cc dot u-szeged dot 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]