This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch to mark pure & constant functions with loops
- From: Fergus Henderson <fjh at cs dot mu dot oz dot au>
- To: John Wehle <john at feith dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 26 Mar 2002 08:49:48 +1100
- Subject: Re: Patch to mark pure & constant functions with loops
- References: <200203251842.g2PIg1508894@jwlab.FEITH.COM>
On 25-Mar-2002, John Wehle <john@feith.com> wrote:
> --- gcc/function.h Thu Mar 21 23:22:01 2002
> *************** struct function
> *** 425,430 ****
> --- 425,434 ----
> /* Nonzero if the function being compiled issues a computed jump. */
> unsigned int has_computed_jump : 1;
>
> + /* Nonzero if the function being compiled doesn't contain any loops
> + which might not terminate. This is set before mark_constant_function. */
> + unsigned int has_no_endless_loops : 1;
It may be worth documenting here that this only counts loop constructed
from branches within the function, not infinite recursion
or longjmp/setjmp() loops.
--
Fergus Henderson <fjh@cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.