-
- Downloads
Add target hook invoked when cfun changes.
2007-09-05 Sandra Loosemore <sandra@codesourcery.com> gcc/ Add target hook invoked when cfun changes. * doc/tm.texi (TARGET_SET_CURRENT_FUNCTION): Document. * target.h (struct gcc_target): Add set_current_function. * target-def.h (TARGET_SET_CURRENT_FUNCTION): Define. (TARGET_INITIALIZER): Add initializer for set_current_function. * tree.h (push_struct_function): New. * tree-inline.h (push_cfun, pop_cfun): Move declarations to... * function.h: Here. (set_cfun): Declare. * tree-inline.c (cfun_stack, push_cfun, pop_cfun): Moved to... * function.c: Here. (push_function_context_to): Use allocate_struct_function to create null context, not init_dummy_function_start. Use set_cfun. (pop_function_context_from): Use set_cfun. (in_dummy_function): New. (invoke_set_current_function_hook): New. (set_cfun): New. (push_cfun, pop_cfun): Use set_cfun. (push_struct_function): New. (allocate_struct_function): Call invoke_set_current_function_hook before returning. (prepare_function_start): Don't set cfun here. Remove unused argument; fix all callers. (init_dummy_function_start): Fiddle with in_dummy_function. Call push_struct_function. (init_function_start): Set cfun here. (expand_dummy_function_end): Fiddle with in_dummy_function. Pop cfun. * omp-low.c (create_omp_child_function): Use push_struct_function and pop_cfun to save/restore state. (expand_omp_parallel): Remove unused saved_cfun variable. * cgraphunit.c (ipa_passes): Use set_cfun. * gimple-low.c (record_vars_into): Use push_cfun/pop_cfun here. * dwarf2out.c (dwarf2out_abstract_function): Likewise. * matrix-reorg.c (transform_allocation_sites): Likewise. (matrix_reorg): Use set_cfun. * gimplify.c (gimplify_function_tree): Use push_cfun/pop_cfun here. * tree-optimize.c (tree_rest_of_compilation): Remove one redundant assignment to cfun; use set_cfun for the other. * tree-cfg.c (move_sese_region_to_fn): Use set_cfun. (dump_function_to_file): Use push_cfun/pop_cfun here. * c-decl.c (finish_function): Use set_cfun. gcc/ada/ * trans.c (Compilation_unit_to_gnu): Use set_cfun. * utils.c (end_subprog_body): Likewise. gcc/cp/ * decl.c (finish_function): Use set_cfun. * method.c (use_thunk): Likewise. gcc/fortran/ * trans-decl.c (build_entry_thunks): Use set_cfun. (gfc_generate_function_code): Likewise. gcc/java/ * decl.c (finish_method): Use set_cfun. gcc/treelang/ * treetree.c (tree_code_create_function_wrapup): Use set_cfun. From-SVN: r128132
Showing
- gcc/ChangeLog 45 additions, 0 deletionsgcc/ChangeLog
- gcc/ada/ChangeLog 5 additions, 0 deletionsgcc/ada/ChangeLog
- gcc/ada/trans.c 1 addition, 1 deletiongcc/ada/trans.c
- gcc/ada/utils.c 1 addition, 1 deletiongcc/ada/utils.c
- gcc/c-decl.c 1 addition, 1 deletiongcc/c-decl.c
- gcc/cgraphunit.c 1 addition, 1 deletiongcc/cgraphunit.c
- gcc/cp/decl.c 1 addition, 1 deletiongcc/cp/decl.c
- gcc/cp/method.c 1 addition, 1 deletiongcc/cp/method.c
- gcc/doc/tm.texi 17 additions, 0 deletionsgcc/doc/tm.texi
- gcc/dwarf2out.c 2 additions, 4 deletionsgcc/dwarf2out.c
- gcc/fortran/ChangeLog 5 additions, 0 deletionsgcc/fortran/ChangeLog
- gcc/fortran/trans-decl.c 2 additions, 2 deletionsgcc/fortran/trans-decl.c
- gcc/function.c 113 additions, 32 deletionsgcc/function.c
- gcc/function.h 5 additions, 0 deletionsgcc/function.h
- gcc/gimple-low.c 2 additions, 4 deletionsgcc/gimple-low.c
- gcc/gimplify.c 5 additions, 4 deletionsgcc/gimplify.c
- gcc/java/ChangeLog 4 additions, 0 deletionsgcc/java/ChangeLog
- gcc/java/decl.c 1 addition, 1 deletiongcc/java/decl.c
- gcc/matrix-reorg.c 4 additions, 4 deletionsgcc/matrix-reorg.c
- gcc/omp-low.c 3 additions, 4 deletionsgcc/omp-low.c
Loading
Please register or sign in to comment