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: [killloop] Ivopts cleanups & improvements


! /* 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?


Paolo


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