diff options
Diffstat (limited to 'gcc/function.h')
-rw-r--r-- | gcc/function.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/gcc/function.h b/gcc/function.h index fec0168..93a9b82 100644 --- a/gcc/function.h +++ b/gcc/function.h @@ -468,6 +468,37 @@ extern GTY(()) struct rtl_data x_rtl; want to do differently. */ #define crtl (&x_rtl) +struct GTY(()) stack_usage +{ + /* # of bytes of static stack space allocated by the function. */ + HOST_WIDE_INT static_stack_size; + + /* # of bytes of dynamic stack space allocated by the function. This is + meaningful only if has_unbounded_dynamic_stack_size is zero. */ + HOST_WIDE_INT dynamic_stack_size; + + /* # of bytes of space pushed onto the stack after the prologue. If + !ACCUMULATE_OUTGOING_ARGS, it contains the outgoing arguments. */ + int pushed_stack_size; + + /* # of dynamic allocations in the function. */ + unsigned int dynamic_alloc_count : 31; + + /* Nonzero if the amount of stack space allocated dynamically cannot + be bounded at compile-time. */ + unsigned int has_unbounded_dynamic_stack_size : 1; +}; + +#define current_function_static_stack_size (cfun->su->static_stack_size) +#define current_function_dynamic_stack_size (cfun->su->dynamic_stack_size) +#define current_function_pushed_stack_size (cfun->su->pushed_stack_size) +#define current_function_dynamic_alloc_count (cfun->su->dynamic_alloc_count) +#define current_function_has_unbounded_dynamic_stack_size \ + (cfun->su->has_unbounded_dynamic_stack_size) +#define current_function_allocates_dynamic_stack_space \ + (current_function_dynamic_stack_size != 0 \ + || current_function_has_unbounded_dynamic_stack_size) + /* This structure can save all the important global and static variables describing the status of the current function. */ @@ -486,6 +517,9 @@ struct GTY(()) function { /* The loops in this function. */ struct loops *x_current_loops; + /* The stack usage of this function. */ + struct stack_usage *su; + /* Value histograms attached to particular statements. */ htab_t GTY((skip)) value_histograms; |