This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Loop unrolling
- To: amylaar at cygnus dot co dot uk
- Subject: Re: Loop unrolling
- From: mrs at wrs dot com (Mike Stump)
- Date: Thu, 11 Jun 1998 11:04:17 -0700
- Cc: egcs-patches at cygnus dot com, egcs at cygnus dot com, pfeifer at dbai dot tuwien dot ac dot at
> From: Joern Rennecke <amylaar@cygnus.co.uk>
> To: mrs@wrs.com (Mike Stump)
> Date: Thu, 11 Jun 1998 13:18:50 +0100 (BST)
> Cc: pfeifer@dbai.tuwien.ac.at, egcs-patches@cygnus.com, egcs@cygnus.com
> Well, how about some plain C macroid code:
macros are not your friend, don't use them. Having said that...
After preprocessing, the ')' and ';' appear adjacent, hence it is a
empty loop, hence it should not be removed.
> #define NOP(X, N) /* This space intentionally left blank */
> #define FROB(X, OP) \
> do { \
> foo (x); \
> for (i = n; --i >=0; ) \
> OP (X, i); \
> bar(x); \
> } while (0);
> FROB (x, NOP);