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]

Re: Code enlargement


On Sat, Sep 01, 2001 at 02:18:17PM +0200, Frank Klemm wrote:
> 	- avoid this trick with '-Os', may be also with '-O2', because speed
> 	  increase is very little, zero or below zero. Brnach prediction
> 	  seems to work very well.

Certainly I agree that different heuristics should be used with -Os,
but it's not so much "avoid this trick" as "reorganize to minimize
branches rather than create a non-branching fast-path".

For -Os we should consider the size of the branch to be the weight
of the edge, and find a layout with minimal total cost.  The existing
branch-shortening infrastructure can be used to find sizes of 
instructions.

Care to write some code to implement this?



r~


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