summaryrefslogtreecommitdiff
path: root/gcc/langhooks.h
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2003-02-12 22:48:59 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2003-02-12 21:48:59 +0000
commite72fcfe8e47d6b453a9a7685c64b8595c32a2252 (patch)
tree145028e0c53cc6c7857dc24db0335535b3ff24ab /gcc/langhooks.h
parent9037b0c71ed8277d06fd67fff15ea40aee9754ef (diff)
downloadgcc-e72fcfe8e47d6b453a9a7685c64b8595c32a2252.tar.gz
Makefile.in (CRTSTUFF_CFLAGS): Add -fno-unit-at-a-time
* Makefile.in (CRTSTUFF_CFLAGS): Add -fno-unit-at-a-time (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 From-SVN: r62789
Diffstat (limited to 'gcc/langhooks.h')
-rw-r--r--gcc/langhooks.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/langhooks.h b/gcc/langhooks.h
index 32782c1722c..3118d2cfc69 100644
--- a/gcc/langhooks.h
+++ b/gcc/langhooks.h
@@ -58,6 +58,15 @@ struct lang_hooks_for_tree_inlining
union tree_node *));
};
+struct lang_hooks_for_callgraph
+{
+ /* Function passed as argument is needed and will be compiled.
+ Lower the representation so the calls are explicit. */
+ void (*lower_function) PARAMS ((union tree_node *));
+ /* Produce RTL for function passed as argument. */
+ void (*expand_function) PARAMS ((union tree_node *));
+};
+
/* Lang hooks for management of language-specific data or status
when entering / leaving functions etc. */
struct lang_hooks_for_functions
@@ -353,6 +362,8 @@ struct lang_hooks
struct lang_hooks_for_tree_inlining tree_inlining;
+ struct lang_hooks_for_callgraph callgraph;
+
struct lang_hooks_for_tree_dump tree_dump;
struct lang_hooks_for_decls decls;