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: RFA: Revamp fortran array types


Hi,

On Tue, 18 Aug 2009, Dominique Dhumieres wrote:

> > Largest progress was seen for "induct" where the run time decreased from
> > 37.19s to 28.39s (24% faster) ...
> 
> On my macbook (Core2Duo) I just see the opposite: ~58s with the patch versus
> ~34s without it. If I am reading my logs correctly, I did not see that with 
> the first patch.
> 
> I also tried using the unpatched gcc/tree-ssa-structalias.c without 
> change.

Hmm, richi tried polyhedron and verified that it is the 
tree-ssa-structalias.c hunk.  Unfortunately that hunk alone is already a 
correctness fix, as demonstrated with this testcase:

----------------------------------
  integer, target :: foo
  integer, pointer :: p,p2
  integer :: i
  p=>foo
  p2=>foo
  i = clobber(p,p2)
  if (i /= 2) call abort
contains
  function clobber(p,p2)
    integer clobber
    integer, pointer :: p,p2
    p = 1
    p2 = 2
    clobber = p
  end function
end
----------------------------------

An unpatched compiler with "-O2 -fno-inline" will make this testcase 
abort, exactly due to the hack called flag_argument_noalias.  We really 
have to take it out, even if it temporarily slows down polyhedron.  My 
guess is that polyhedron uses array parameters with defered shape in many 
subroutines.  These are not nicely handled by my current patch, but richi 
has some work-in-progress stuff that should enable also restrict 
qualifiers for such arguments.  If my guess is right the slowdown will be 
fixed by that work.


Ciao,
Michael.


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