🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #1144

unroll loops

#1144
From: Marty Leisner
Date: Mon, 14 Sep 1992 17:47
34 lines
1294 bytes
I'm using gcc 2.2.2 on a SS2 running SunOS 4.1.2.

I tried the optimization -funroll-loops and cc1 says:
cc1: Invalid option `-funroll-loops"'

This isn't a machine dependent option?

On a sparc, -fno-frame-pointer also doesn't work (I'm not sure a sparc as a
frame pointer?)

Anyway, this is the code I want to optimize...doing something like Duff's
device doesn't increase speed much:

#define SPI  400
#define WIDTH ((int) (SPI*8.5))
#define HEIGHT ((int) (SPI*11))

unsigned char image[HEIGHT][WIDTH];

unsigned char lut[256];

/* apply look up table to an image */
void apply_lut()
{
	unsigned char *pimage;

	for(pimage = image; pimage <= &image[HEIGHT][WIDTH]; pimage++)
		*pimage = lut[*pimage];
}


Marty    leisner.henr801c@xerox.com 
          Member of the League for Programming Freedom 
 	Give me source or waste my time..
Technical Details
Message-ID: <9209141747.AA00595@annapurna.wbst147.xerox.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!annapurna.ai.mit.EDU!leisner

Show Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!annapurna.ai.mit.EDU!leisner
From: leisner@annapurna.ai.mit.EDU ( Marty Leisner)
Subject: unroll loops
Message-ID: <9209141747.AA00595@annapurna.wbst147.xerox.com>
Sender: gnulists@ai.mit.edu
Reply-To: leisner.henr801c@xerox.com
Organization: Xerox
Distribution: gnu
Date: Mon, 14 Sep 1992 17:47:04 GMT
Approved: bug-gcc@prep.ai.mit.edu
Lines: 35