This is the mail archive of the
mailing list for the GCC project.
Re: Code enlargement
- To: Frank Klemm <pfk at fuchs dot offl dot uni-jena dot de>
- Subject: Re: Code enlargement
- From: Richard Henderson <rth at redhat dot com>
- Date: Sat, 1 Sep 2001 10:21:04 -0700
- Cc: gcc at gcc dot gnu dot org
- References: <20010901141817.B1368@fuchs.offl.uni-jena.de>
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
Care to write some code to implement this?