[lkml]   [2009]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: gcc inlining heuristics was Re: [PATCH -v7][RFC]: mutex: implement adaptive spinning
Linus Torvalds wrote:
> > This is about storage allocation, not aliases. Storage allocation only
> > depends on lifetime.
> Well, the thing is, code motion does extend life-times, and if you think
> you can move stores across each other (even when you can see that they
> alias statically) due to type-based alias decisions, that does essentially
> end up making what _used_ to be disjoint lifetimes now be potentially
> overlapping.

Sometimes code motion makes code faster and/or smaller but use more
stack space. If you want to keep the stack use down, it blocks some
other optimisations.

Register allocation is similar: code motion optimisations may use more
registers due to overlapping lifetimes, which causes more register
spills and changes the code. The two interact; it's not trivial to
optimise fully.

-- Jamie

 \ /
  Last update: 2009-01-13 00:05    [W:0.206 / U:4.164 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site