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]

[patch] Fix for PR34976: fix interchange profitability


Hi,

it makes no sense to transform the testcase in this PR: the size of
the data processed by the loop is small enough to be in the L1 cache.
This patch fixes the PR by tuning the profitability function.  Okay
for trunk after regstrap?

This patch does NOT fix the problem itself, because that would be to
rewrite a major part of the perfect_nestify HACK: I'm tired to tweak
this function that should be replaced by a correct loop distribution.

If you really want to know what this function produces, it's scarry,
but anyway, from:

  do i=1,6
     do j=1,6
        gr(i,j)=0.d0
     enddo
     if(i.le.3) then
        gr(i,i)=1.d0
     else
        gr(i,i)=0.5d0
     endif
  enddo

perfect_nestify transforms this code into:

  do i=1,6
     do j=1,6
        gr(i,j)=0.d0
     enddo
  enddo
  do i=1,6
     gr(i,i)=1.d0
     gr(i,i)=0.5d0
  enddo

Yes, that's just removing the condition, and also other incredible
things... that end on the ICE.

-- 
Sebastian
AMD - GNU Tools


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