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: g++ 3.4.0 cygwin, codegen SSE & alignement issues


> Well, it's quicker to allocate a constant size stack frame than to
>dynamically calculate the alignment requirements, but only by two or
>three fairly trivial instructions.  And although aligning the frame just
>once at startup and keeping it aligned by always allocating aligned-size
>stack frames, in some situations stack memory is a limited resource, and
>particularly since not all code uses vector registers, there's a lot of
>stack memory usage to be saved by not making all the stack frames bigger
>just for the sake of the very few frames for functions that actually
>use the vector regs.  So I'd say it's probably one of those trade-offs
>for which there's no one 'right' answer.

I think a happy middle-way, at least for the i386 port, would be to
implement a special function attribute, say __attribute__((align_stack)),
that only dynamically aligns the stack of functions defined with the
attribute.

						Ross Ridge

-- 
 l/  //	  Ross Ridge -- The Great HTMU
[oo][oo]  rridge@csclub.uwaterloo.ca
-()-/()/  http://www.csclub.uwaterloo.ca/u/rridge/ 
 db  //	  


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