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: Memory partitioning considered harmful (!?)


On 1/29/07, Richard Guenther <rguenther@suse.de> wrote:

I see more and more cases where we do strange memory partition decisions that end up pessimizing loop constructs a lot. For example the fatigue (polyhedron) benchmark has a loop like

               do n = 1, number_of_sample_points
                   coefficient = (radius(n) / radius_of_curvature) *
sin(twopi *            &

real(spin_frequency,LONGreal) * time)
                   strain_tensor(1,1,n) = - coefficient * Poissons_ratio
                   strain_tensor(2,2,n) = - coefficient * Poissons_ratio
                   strain_tensor(3,3,n) = coefficient
!
                   coefficient = twopi * real(spin_frequency,LONGreal) *
(radius(n) /       &
                                                    radius_of_curvature) *
cos(twopi *      &

real(spin_frequency,LONGreal) * time)

                   strain_rate_tensor(1,1,n) = -coefficient *
Poissons_ratio
                   strain_rate_tensor(2,2,n) = - coefficient *
Poissons_ratio
                   strain_rate_tensor(3,3,n) = coefficient
               end do

where we end up putting the induction variable 'n' into a MPT together
with 'spin_frequency' (both are integers) which makes the calls to
sin and cos no longer loop invariant.


Out of curiosity, how is n aliased at all in the above? IE why is it in a memory partition. It's not address taken in any visible way, unless fortran does something behind your back :)

This is caused by either the partitioning of call clobbered variables
or, if I disable that, by partitioning the SMTs that make up call
clobbered variables.


There are certainly better partitioning heuristics than what we do now, and i know diego has said he welcomes any tuning of the heuristics we have to get better results. ways to partition than we do now.


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