[PATCH] Merging BB and user labels (tree level)

Andrew Pinski pinskia@physics.uc.edu
Fri Dec 17 04:53:00 GMT 2004


On Dec 16, 2004, at 11:46 PM, Andrew Pinski wrote:

> I was looking at some fortran code and I noticed that we were merging
> some Basic Blocks because it included an user label.  I noted that on 
> the
> rtl level we merge the BBs and just move the user label to the 
> beginning
> of the BB we are merging into.
>
> To get the "correct" output at -O0, I just enabled this when 
> optimizing.
>
> OK? Bootstrapped and tested on powerpc-darwin with no regressions.
>
> Also checked to make sure at -O0, we don't merge basic blocks with user
> labels.
>
> I don't know if this is unsuitable for 4.0, but it should help compile
> time and also code generation but I have not tested it on SPEC because
> I don't have access to it.

Oh, I had forgot to mention we are now able to vectorize the following
fortran code with this patch:
       subroutine s111 (ntimes,ld,n,ctime,dtime,a,b,c,d,e,aa,bb,cc)
c
c     linear dependence testing
c     no dependence - vectorizable
c
       integer ntimes, ld, n, i, nl
       real a(n), b(n), c(n), d(n), e(n), aa(ld,n), bb(ld,n), cc(ld,n)
       real t1, t2, second, chksum, ctime, dtime, cs1d
       do 1 nl = 1,2*ntimes
       do 10 i = 2,n
          a(i) = c(i) + b(i)
   10  continue
       call dummy(ld,n,a,b,c,d,e,aa,bb,cc,1.)
   1   continue
       return
       end

Thanks,
Andrew Pinski



More information about the Gcc-patches mailing list