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]
Other format: [Raw text]

Re: [patch] basic-block.h: Speed up FOR_EACH_EDGE.


On Tue, Mar 01, 2005 at 09:03:53PM -0500, Kazu Hirata wrote:
> In order to cram a construct like
> 
>   for (i = 0; i < length; i++)
>     {
>       e = EDGE_I (blah, i);
> 
>       /* Do something eith e. */
>     }
>   e = NULL;
> 
> into a single "for" loop, I created a helper function called ei_cond.

As opposed to (i < length ? e = EDGE_I (blah, i), 1 : 0)?
Kinda gross, I know, but not horrible for burying in macros.
I suppose it doesn't matter.



r~


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