🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.dsp
Article #1882

Re: compilers for DSP processors

#1882
From: G.R. Basile
Date: Tue, 22 Dec 1992 14:58
41 lines
2514 bytes
malcolm@Apple.COM (Malcolm Slaney) writes:

> cmh@eng.cam.ac.uk (C.M. Hicks) writes:
> >DSP chips are designed to be fast, and to slow them down with compiled code
> >seems daft, particularly in real-time applications. 
> 
> On most reasonable processors, people have found that the compilers write
> better code than humans do.  Compilers can do a much better job of global
> register allocation, scheduling, and all the other things that make for
> good translations.  This is especially true of today's RISC machines (DEC,
> IBM, HP, Sun, Cray, MIPS). For a good exposition of the power of a compiler, 
> read John Ellis' book on the Bulldog compiler for VLIW machines.
> 
well, since you drag in RISC chips,

I did an application that decompressed G4 images and then scaled the images for
a for a 300 page per minute printer . The C compiler was GNU and the risc was the 
Intel 80960CA. The code had beed optimized a lot in C and was still not fast
enough.


My usual experience with C compilers on DSP's  that a 8 to 10 x increase 
in speed is possible in the c to asm port. After looking at the output 
of the GNU 80960 C compiler, I was impressed with the efficiency of the 
assembler output. I estimated that the increase in speed in the c to asm 
port would be a factor of 2 at best. I was able to attain a 3x speed increase
on the G4 decompression code and A 8X IMPROVEMENT on the scaling code.

This speed increase was due to 1) using a machine instruction the 
complier was clueless about, and 2) an optimization of the scaling algorithmn
that would have been not obvious at the compiler level.
> 
> Listen up DSP makers....compilers can write better assembly code than us
> mere humans.....especially if you give the compiler a chance.  Pay attention
> to the lessons that the RISC people taught the CISC dinasours.
> 
DSP makers... I would rather you use the extra microcode on the processors to
give a fast, application specific instructions than to create instructions 
that would make a C compiler more efficient.

Greg Basile
Technical Details
Message-ID: <FFV7VB1w164w@gmp.lonestar.org>
Path: arc1-ca.pugleaf.net!sparky!uunet!olivea!pagesat!spssig.spss.com!news.oc.com!utacfd.uta.edu!rwsys!kf5iw!gmp!greg
References: <75774@apple.apple.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!olivea!pagesat!spssig.spss.com!news.oc.com!utacfd.uta.edu!rwsys!kf5iw!gmp!greg
From: greg@gmp.lonestar.org (G.R. Basile)
Newsgroups: comp.dsp
Subject: Re: compilers for DSP processors
Keywords: compilers, dsp, assembly language, vliw, c
Message-ID: <FFV7VB1w164w@gmp.lonestar.org>
Date: 22 Dec 92 14:58:02 GMT
References: <75774@apple.apple.COM>
Organization: GMP Research Co., Dallas TX
Lines: 41