Related articles |
---|
SPARC compiler optimisation gregw@highland.oz.au (1992-02-13) |
Re: SPARC compiler optimisation casper@fwi.uva.nl (1992-02-14) |
Re: SPARC compiler optimisation how@leland.stanford.edu (1992-02-14) |
Re: SPARC compiler optimisation ucsd!math.ucla.edu!pmontgom@uunet.uu.net (1992-02-15) |
Re: SPARC compiler optimisation grunwald@foobar.cs.colorado.edu (1992-02-22) |
Re: SPARC compiler optimisation andrew@highland.oz.au (1992-02-26) |
Re: SPARC compiler optimisation dmk@craycos.com (1992-02-27) |
Re: SPARC compiler optimisation nickh@CS.CMU.EDU (1992-02-28) |
Re: SPARC compiler optimisation nickh@CS.CMU.EDU (1992-03-02) |
Re: SPARC compiler optimisation preston@dawn.cs.rice.edu (1992-03-02) |
Re: SPARC compiler optimisation vanroy@prl.dec.com (1992-03-09) |
Newsgroups: | comp.compilers,comp.sys.sun.misc |
From: | grunwald@foobar.cs.colorado.edu |
Keywords: | sparc, optimize, GCC |
Organization: | University of Colorado at Boulder |
References: | 92-02-062 92-02-071 |
Date: | Sat, 22 Feb 1992 04:31:23 GMT |
>From comparison purposes, here's the code from gcc2, using
gcc -O5 -funroll-loops foo.c
Note that the loop is unrolled and that you're elimianting a lot of the
overhead. ``gcc2. It's not just for breakfast anymore''
gcc2_compiled.:
.text
.align 4
.global _main
.proc 1
_main:
!#PROLOGUE# 0
sethi %hi(-4136),%g1
or %g1,%lo(-4136),%g1
save %sp,%g1,%sp
!#PROLOGUE# 1
call ___main,0
mov 0,%i0
mov 999,%o2
add %fp,3980,%o1
L5:
ld [%o1-4000],%o0
or %i0,%o0,%i0
ld [%o1-4004],%o0
or %i0,%o0,%i0
ld [%o1-4008],%o0
or %i0,%o0,%i0
ld [%o1-4012],%o0
or %i0,%o0,%i0
ld [%o1-4016],%o0
or %i0,%o0,%i0
ld [%o1-4020],%o0
or %i0,%o0,%i0
ld [%o1-4024],%o0
or %i0,%o0,%i0
ld [%o1-4028],%o0
add %o2,-9,%o2
or %i0,%o0,%i0
ld [%o1-4032],%o0
cmp %o2,0
add %o1,-36,%o1
bg L5
or %i0,%o0,%i0
ret
restore
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.