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]
Other format: [Raw text]

Re: Variable Expansion Optimization


Hi,

On Sun, 15 Aug 2004, Steven Bosscher wrote:

> Hmm, I guess you're going to have carefully analyze what the
> effects of such a transformation are on register pressure.

Yes.  But note that this transformation mainly helps an autovectorizer.  
For instance the summation loop, when unrolled 4 times, can be implemented 
by carrying the four partial sums in one vector register, thus not 
requiring more registers than without.  Of course the right heuristics 
have to be applied to make this work.  Without such the added register 
pressure is not worth this in most cases.

> The code for foo2 is really bad.

Ideally it would be autovectorized to use 2 SSE2 registers.

> I guess you need to work with the unroller to figure out when you can
> profitably apply this transformation.  Perhaps you even want to be able
> to partially reroll a loop?


Ciao,
Michael.


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