This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Loop unrolling


> 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);



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]