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: Patch to mark pure & constant functions with loops


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.


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