This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How to detect whether we're inside of a loop??
- From: dewar at gnat dot com (Robert Dewar)
- To: geoffk at geoffk dot org, ghazi at caip dot rutgers dot edu
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 11 Apr 2003 12:09:31 -0400 (EDT)
- Subject: Re: How to detect whether we're inside of a loop??
> The average you cite above for loops means that the loop-body is still
> executed more often than code which is not in a loop, just not by as
> much as I'd hoped. And if-then clauses have execution probability of
> less than one for each clause so code in there is even less likely to
> be executed than loop bodies.
Normal assumptions are that inner loops are executed more often than
outer loops. The figure of 1.5 is wildly wrong for inner loops