This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fixes to estimate_num_insns from pretty-ipa branch
- From: Zdenek Dvorak <rakdver at kam dot mff dot cuni dot cz>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 9 Apr 2009 18:22:39 +0200
- Subject: Re: Fixes to estimate_num_insns from pretty-ipa branch
- References: <20090409141822.GB23648@kam.mff.cuni.cz>
Hi,
> 6) Esimated_unrolled_size have off-by-one bug. When loop iterates 4 times, it is estimating
> inlined body size as containing 5 copies.
this is actually correct. Number of iterations of a loop as passed to
estimated_unrolled_size is the number of executions of a latch edge.
Since the exit edge is expected to be after loop body, if latch
is executed 4 times, then the body will be executed 5 times.
Zdenek