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: Short Displacement Optimizations.


<<In general it is desirable to minimize the number of instructions used  for
setting appropriate locations in the frame.Although I am still investigating
the problems
further, I would like to know views of the community on this.And would be
keen
to implement a solution.
>>

It is certainly normal procedure in compilers to sort local variables by
increasing size. That minimizes gaps and as Naveen points out minimizes
cost of large displacements. I would consider this absolutely standard
practice. I am a bit surprised this is not already done.

Indeed what many compilers do is to decide that big static arrays should
not be handled statically but instead treated like dynamic arrays with
a separate pointer allocated on the stack in the easily accessible
fixed part.


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