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: Better estimations of costs in outof-ssa


On Thu, 2005-07-28 at 03:22, Jan Hubicka wrote:
> Hi,
> outofssa is pretty simple minded about cost estimation of copy instructions it
> inserts.  In testcase I was looking at (bresenham line drawing loop) it opted
> to split critical edge within loop instead of adding copy off the loop.  This
> patch makes the individual costs to be weighted by profile.  This has (very
> small) positive impact to SPEC too (roughly 4 points, but close to noise).


Yeah, this is fine and long overdue.  

The cost field is present in add_coalesce for exactly this sort of
reason. When I first implemented it, the loop nesting cost wasn't
trivially available (doesn't that age it...). I punted until it was...
and simply never got back to it.  Increasing the cost for critical edges
is also a good idea :-)

Leaving the cost at 1 for size optimization seems like the right thing
too.

Andrew




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