1997-12-15 [should be 1997-12-25 ?] egcs snapshot available -m68k-next-nextstep3 results
Toon Moene
toon@moene.indiv.nluug.nl
Sun Dec 28 06:34:00 GMT 1997
I successfully built egcs-971225 on m68k-next-nextstep3.
Running c-torture-1.45 on it (dejagnu doesn't build on this
machine) I got one `regression':
% diff egcs-971225.cto?t egcs-1.0.cto?t
321,328d320
< ERROR: 961203-1.c: compiler returns exit status 1:
< ERROR: 961203-1.c: compiler returns exit status 1: -O
-fno-omit-frame-pointer
< ERROR: 961203-1.c: compiler returns exit status 1: -O
-fomit-frame-pointer
< ERROR: 961203-1.c: compiler returns exit status 1: -O2
-fno-omit-frame-pointer
< ERROR: 961203-1.c: compiler returns exit status 1: -O2
-fomit-frame-pointer
< ERROR: 961203-1.c: compiler returns exit status 1: -O3
-fno-omit-frame-pointer
< ERROR: 961203-1.c: compiler returns exit status 1: -O3
-fomit-frame-pointer
< ERROR: 961203-1.c: compiler returns exit status 1: -O3
-funroll-all-loops
561c553
< Test completed with 32 failures
---
> Test completed with 24 failures
This isn't a real regression, however:
% /usr/test/bin/gcc c-torture-1.45/compile/961203-1.c
c-torture-1.45/compile/961203-1.c:2: size of array `a' is too large
Alias analysis did make a step backwards, though. Here's a routine
I used about a year ago on the gcc2 mailing list to show that
John's alias analysis really works:
subroutine MXMA( A, IA, JA, B, IB, JB, C, IC, JC, M, K, N )
implicit none
integer i, j, l, ia, ja, ib, jb, ic, jc, m, k, n
double precision a(*), b(*), c(*)
if ( m .lt. 0 .or.
, n .lt. 0 .or.
, k .lt. 0 .or.
, ia .eq. 0 .or.
, ja .eq. 0 .or.
, ib .eq. 0 .or.
, jb .eq. 0 .or.
, ic .eq. 0 .or.
, jc .eq. 0 ) then
write(0,*)'MXMA - ARGUMENT ERROR; ABORT'
call abort
endif
if ( m .eq. 0 .or. n .eq. 0) return
do i = 1, m
do j = 1, n
c((i-1)*ic+(j-1)*jc+1) = 0.0
enddo
enddo
if ( k .eq. 0 ) return
do i = 1, m
do j = 1, n
do l = 1, k
c((i-1)*ic+(j-1)*jc+1) = c((i-1)*ic+(j-1)*jc+1) +
, a((i-1)*ia+(l-1)*ja+1) * b((l-1)*ib+(j-1)*jb+1)
enddo
enddo
enddo
return
end
This is the inner loop as produced by previous versions of egcs:
L28:
movel a6@(8),a1
fmoved a1@(d0:l:8),fp0
movel a6@(20),a1
fmuld a1@(d1:l:8),fp0
faddd a0@,fp0
fmoved fp0,a0@
addl a6@(-4),d1
addl d6,d0
dbra d2,L28
And this is what we get now:
L28:
movel a2,d3
mulsl a5@,d3
movel a0,d0
mulsl a4@,d0
addl d0,d3
movel a2,d2
movel a6@(12),a3
mulsl a3@,d2
movel d5,d0
movel a6@(16),a3
mulsl a3@,d0
addl d0,d2
movel d5,d1
movel a6@(24),a3
mulsl a3@,d1
movel a0,d0
movel a6@(28),a3
mulsl a3@,d0
addl d0,d1
movel a6@(8),a3
fmoved a3@(d2:l:8),fp0
movel a6@(20),a3
fmuld a3@(d1:l:8),fp0
movel a6@(32),a3
faddd a3@(d3:l:8),fp0
fmoved fp0,a3@(d3:l:8)
addql #1,d5
dbra d4,L28
The abundance of integer multiplies clearly shows that strength
reduction couldn't find the induction variables, most probably
because alias analysis didn't proclaim ia, ib, ic, ja, jb, and jc
loop invariants (note: g77 passes by reference, so alias analysis
must prove that c doesn't overlap these scalar variables !).
Toon.
More information about the Gcc
mailing list