diff options
author | froydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-07-06 02:26:33 +0000 |
---|---|---|
committer | froydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-07-06 02:26:33 +0000 |
commit | 2ab2ce89368289e93c9022aae8689f109c132f5c (patch) | |
tree | d191bb056818e7ad987268cffaf32a266a191f4c /gcc/function.h | |
parent | 01741c270449416238f8e70d812d0b71edcbd495 (diff) | |
download | gcc-2ab2ce89368289e93c9022aae8689f109c132f5c.tar.gz |
gcc/
* vec.h (FOR_EACH_VEC_ELT_REVERSE): New macro.
* function.h (struct_function): Change type of local_decls field
to a VEC.
(add_local_decl): New function.
(FOR_EACH_LOCAL_DECL): New macro.
* cfgexpand.c (init_vars_expansion): Adjust for new type of
cfun->local_decls.
(estimated_stack_frame_size): Likewise.
(expand_used_vars): Likewise.
* cgraphbuild.c (build_cgraph_edges): Likewise.
* function.c (instantiate_decls_1): Likewise.
* ipa-struct-reorg.c (build_data_structure): Likewise.
* ipa-type-escape.c (analyze_function): Likewise.
* lto-streamer-in.c (input_function): Likewise.
* lto-streamer-out.c (output_function): Likewise.
* tree-ssa-live.c (remove_unused_locals): Likewise.
* tree.c (free_lang_data_in_decl): Likewise.
(find_decls_types_in_node): Likewise.
* omp-low.c (remove_exit_barrier): Likewise.
(expand_omp_taskreg): Likewise.
(list2chain): Rename to...
(vec2chain): ...this. Adjust.
* cgraphunit.c (assemble_thunk): Call add_local_decl.
* tree-cfg.c (replace_by_duplicate_decl): Likewise.
* gimple-low.c (record_vars_into): Likewise.
* tree-inline.c (remap_decls): Likewise.
(declare_return_variable): Likewise.
(declare_inline_vars): Likewise.
(copy_forbidden): Adjust for new type of cfun->local_decls.
(add_local_variables): New function.
(expand_call_inline): Call it.
(tree_function_versioning): Likewise.
gcc/cp/
* decl.c (cp_finish_decl): Call add_local_decl.
* optimize.c (clone_body): Adjust for new type of cfun->local_decls.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161862 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/function.h')
-rw-r--r-- | gcc/function.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/gcc/function.h b/gcc/function.h index 617034872cc..fec0168a5d2 100644 --- a/gcc/function.h +++ b/gcc/function.h @@ -503,8 +503,8 @@ struct GTY(()) function { pointer. */ tree nonlocal_goto_save_area; - /* List of function local variables, functions, types and constants. */ - tree local_decls; + /* Vector of function local variables, functions, types and constants. */ + VEC(tree,gc) *local_decls; /* For md files. */ @@ -609,6 +609,17 @@ struct GTY(()) function { unsigned int is_thunk : 1; }; +/* Add the decl D to the local_decls list of FUN. */ + +static inline void +add_local_decl (struct function *fun, tree d) +{ + VEC_safe_push (tree, gc, fun->local_decls, d); +} + +#define FOR_EACH_LOCAL_DECL(FUN, I, D) \ + FOR_EACH_VEC_ELT_REVERSE (tree, (FUN)->local_decls, I, D) + /* If va_list_[gf]pr_size is set to this, it means we don't know how many units need to be saved. */ #define VA_LIST_MAX_GPR_SIZE 255 |