summaryrefslogtreecommitdiff
path: root/gcc/cgraph.c
Commit message (Collapse)AuthorAgeFilesLines
* * Makefile.in (cgraph.o): Depend on gt-cgraph.h and varray.h.hubicka2003-03-081-1/+18
| | | | | | | | | * gt-cgraph.h: New GC file. * cgraph.c (known_fns): New static variable. (cgraph_node): Add the decl into varray. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63998 138bc75d-0d04-0410-961f-82ee72b054a4
* * gcc.dg/inline-3.c: New test.hubicka2003-03-081-3/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | * c-decl.c: (finish_function): Update call of tree_inlinable_function_p. * cgraph.h: (cgraph_local_info): Add can_inline_once (cgraph_global_info): Add inline_once. (cgraph_node): Add previous. (cgraph_remove_node): New. * cgraphunit.c (cgraph_mark_functions_to_inline_once): New static function. (cgraph_optimize): Call it. (cgraph_finalize_function): Set inlinable flags. (cgraph_finalize_compilation_unit): Actually remove the reclaimed nodes. (cgraph_mark_functions_to_output): Use new inlining heuristics flags. (cgraph_expand_function): Likewise. * cgraph.c (cgraph_node): Put nodes into doubly linked chain. (cgraph_remove_node): New function. * flags.h (flag_inline_functions_called_once): Declare. * tree-inline.c: Include cgraph.h (inlinable_functions_p): Add extra argument to bypass limits. (expand_call_inline): Obey cgraph flag. * tree-inline.h (tree_inlinable_function_p): Update prototype. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63983 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.c (cgraph_node): Do not confuse nested functions and methods.hubicka2003-03-061-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63889 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (calls.o, toplev.o alias.o): Depend on cgraph.hhubicka2003-03-051-0/+16
| | | | | | | | | | | | | | | | | | | | * alias.c: Include cgraph.h (mark_constant_function): Use cgraph_rtl_info. * calls.c: Include cgraph.h (flags_from_decl_or_type): Use cgraph_rtl_info to find pure and const calls. (expand_call): Use cgraph_rtl_info to set preferred stack boundary. * cgraph.c (cgraph_rtl_info): New function. * cgraph.h (cgraph_rtl_info): Declare (cgraph_rtl_info): Likewise. * function.h (struct function): Add recursive_call_emit. * toplev.c: Include cgraph.h. (rest_of_compilation): Set preferred_incoming_stack_boundary. * gcc.dg/i386-local2.c: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63868 138bc75d-0d04-0410-961f-82ee72b054a4
* * gcc.dg/i386-local.c: New.hubicka2003-03-051-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | * toplev.c (rest_of_compilation): Deffer RTL compilation only when RTL inlining is done. * cgraphunit.c (cgraph_mark_local_functions): New local function. (cgraph_optimize): Mark local functions. * i386-protos.h (init_cumulative_args): Update prototype. * i386.c (init_cumulative_args): Use register passing convention for local functions. * cgraph.c (cgraph_global_info_ready): New global variable (cgraph_local_info, cgraph_global_info): New functions. * cgraph.h (struct cgraph_local_info, cgraph_global_info): New structures. (cgraph_local_info, cgraph_global_info, cgraph_global_info_ready): Declare. * cgraphunit.c (cgraph_finalize_function): Set inline_many. (cgraph_mark_functions_to_output): Use inline_many. (cgraph_expand_function): Free DECL_SAVED_TREE uncondtionally. (cgraph_expand_functions): Expand inline functions last. (cgraph_optimize): Do not emit uneeded functions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63822 138bc75d-0d04-0410-961f-82ee72b054a4
* * expmed.c (expand_divmod): Undo sign extensions for unsigned operandshubicka2003-02-221-371/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | * cfgcleanup.c (try_forward_edges): Don't check loop structures when not optimizing. (cleanup_cfg): Do not iterate trought delete_trivially_dead_insns when not expensive. * toplev.c (rest_of_compilation): Duplicate loop headers only when optimizing; Delete trivially dead insns early; fix optimize check. * Makefile.in (c-decl.o, c-objc-common.o, cgraph.o, tree-inline.o): Add dependency on cgraph.h * c-decl.c: Include cgraph.h (finish_function): Update call of tree_inlinable_function_p. * c-objc-common.c: Include cgraph.h * cgraph.h: New file. * cgraphunit.c: New file. * cgraph.c (cgraph_node, cgraph_edge): Move into cgraph.h (cgraph_nodes, cgraph_n_nodes): Globalize. (cgraph_finalize_function, cgraph_finalize_compilation_unit cgraph_create_edges, cgraph_optimize, cgraph_mark_needed_node): Move into cgraphunit.c * tree-inline.c: Include cgraph.h * tree-inline.c: Include cgraph.h git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63281 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.c (NPREDECESORC, SET_NPREDECESORS): Kill.hubicka2003-02-191-39/+53
| | | | | | | | | (cgraph_expand_function): Rewrite. * gcc.dg/funcorder.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63098 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.c (SET_NPREDECESORS): Add intermediate cast to size_t.schwab2003-02-131-2/+2
| | | | | | | | Parenthesize properly. (NPREDECESORS): Parenthesize properly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@62838 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (CRTSTUFF_CFLAGS): Add -fno-unit-at-a-timehubicka2003-02-121-0/+563
(OBJS): Add callgraph.o (callgraph.o): New. * c-decl.c (expand_body_1): Break out from ... (expand_body): This one; change calling convention (finish_function): Move some of expand_body logic here. (c_expand_deferred_function): Update call of expand_body (c_expand_stmt): Use c_expand_body_1. * c-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define. * c-objc-commin.c (c_objc_common_finish_file): Use callgraph code. * c-tree.h (c_expand_body): Declare. * callgraph.c: New file. * flags.h (flag_unit_at_a_time): Declare. * langhooks.h (LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION, LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_CALLGRAPH_INITIALIZER): New macros. * langhooks.h (struct lang_hooks_for_callgraph): New. (struct lang_hooks): Add callgraph field. * toplev.c (flag_unit_at_a_time): New. (lang_independent_options): Add flag_unit_at_a_time. (process_options): Disable unit-at-a-time mode for frontends not supporting callgraph. * tree-inline.c (typedef struct inline_data): Add "decl" (expand_call_inline): Update callgraph. (optimize_inline_calls): Set id.decl. * tree.h (cgraph_finalize_function, cgraph_finalize_compilation_unit, cgraph_create_edges, dump_cgraph, cgraph_optimize, cgraph_remove_call cgraph_calls_p): Declare. * invoke.texi (-funit-at-a-time): Document git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@62789 138bc75d-0d04-0410-961f-82ee72b054a4