Related articles |
---|
Effectiveness of compilers today andreasa@dhhalden.no (1993-02-14) |
Re: Effectiveness of compilers today pardo@cs.washington.edu (1993-02-16) |
Effectiveness of compilers today kanze@us-es.sel.de (1993-02-17) |
Re: Effectiveness of compilers today jpab+@andrew.cmu.edu (Josh N. Pritikin) (1993-02-17) |
Re: Effectiveness of compilers today burley@apple-gunkies.gnu.ai.mit.edu (1993-02-17) |
Re: Effectiveness of compilers today jbuck@forney.berkeley.edu (1993-02-17) |
Re: Effectiveness of compilers today napi@cs.indiana.edu (mohd hanafiah abdullah) (1993-02-17) |
Re: Effectiveness of compilers today moss@cs.cmu.edu (1993-02-18) |
Re: Effectiveness of compilers today preston@dawn.cs.rice.edu (1993-02-18) |
Re: Effectiveness of compilers today roth@helena.cs.rice.edu (1993-02-18) |
[8 later articles] |
Newsgroups: | comp.compilers |
From: | "Josh N. Pritikin" <jpab+@andrew.cmu.edu> |
Keywords: | optimize |
Organization: | Compilers Central |
References: | 93-02-082 |
Date: | Wed, 17 Feb 1993 15:37:48 GMT |
>Could someone tell me more about this. Are there any tests between common
>compilers and assembler programmers. Who is the best?
>[This has indeed been discussed to death in the past. My impression is that
>for a small chunk of code, a human can almost always meet or beat a compiler,
>but for large chunks people aren't as persistent as compilers at optimizing
Assembly programmers will never have job security! Take a look at the GNU
superoptimizer ---
GSO is a function sequence generator that uses an exhaustive
generate-and-test approach to find the shortest instruction sequence for a
given function. You have to tell the superoptimizer which function and
which CPU you want to get code for.
Sample GSO results:
SPARC code for i5 = ((signed) i0 > (signed) i1):
subcc %i1,%i0,%i2
srl %i1,31,%i3
sra %i0,31,%i4
addx %i4,%i3,%i5
Faster 80x86 code than the standard cmpl/seta/and for
ecx = ((unsigned) eax > (unsigned) edx):
cmpl %eax,%edx
sbbl %ecx,%ecx
negl %ecx
MC88000 code for 'find first set bit', i.e., r6 = ffs(r2):
subu.co r3,r0,r2
and r4,r3,r2
addu.ci r5,r4,r4
ff1 r6,r5
POWER (RS/6000) code for r6 = ((unsigned) r3 < (unsigned) r4) + r5
sf r6,r4,r3
sfe r7,r5,r6
sf r8,r7,r6
Aide from the CPUs in the examples above, GSO generates code for
MC680x0, Amd290xx, Pyramid(SP,AP,XP), and Alpha.
joshp@cmu.edu
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.