home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: gnu.gcc.bug
- Path: 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
-
- 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..
-
-