This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [killloop] Ivopts cleanups & improvements
- From: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- To: Paolo Bonzini <paolo dot bonzini at lu dot unisi dot ch>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 31 Aug 2005 12:16:07 +0200
- Subject: Re: [killloop] Ivopts cleanups & improvements
- References: <20050831100809.GA666@atrey.karlin.mff.cuni.cz> <431582FA.3000100@lu.unisi.ch>
Hello,
> >! /* The expected number of loop iterations. The plus one is because
> >! expected_loop_iterations returns number of executions of latch
> >! edge, not of loop body. */
> >! #define AVG_LOOP_NITER(LOOP) (expected_loop_iterations (LOOP) + 1)
> >
> >+ /* Cost accounted for computations that are performed before the loop.
> >*/
> >+
> >+ #define BEFORE_LOOP_COST(LOOP, COST) \
> >+ (((COST) + AVG_LOOP_NITER (LOOP) - 1) / AVG_LOOP_NITER (LOOP))
>
> Do these really need to be #defines?
no, they could be also functions; feel free to change them if you mind
them being macros.
Zdenek