How to detect whether we're inside of a loop??

Geoff Keating geoffk@geoffk.org
Thu Apr 10 01:09:00 GMT 2003


> Date: Wed, 9 Apr 2003 16:56:55 -0400 (EDT)
> From: "Kaveh R. Ghazi" <ghazi@caip.rutgers.edu>

> I think your approach would be suited for finding which of the if-else
> branches to choose.  Finding the looping spots is what I'm looking
> for because I think it has more impact.
> 
> Do you agree with this line of reasoning?

No, not really.  For instance, a little-known fact is that the average
number of iterations for a loop is about 1.5; someone did some
analysis on some huge collection of programs and this is the number
they came up with.  So it's important to know *which* loops to look
at.

-- 
- Geoffrey Keating <geoffk@geoffk.org>



More information about the Gcc mailing list