aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2007-09-11 12:39:53 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2007-09-11 10:39:53 +0000
commite89d6010089634063adfeeec679ac7fbf6afa4e6 (patch)
treea9c246259502c55141f2c727f2747541fd04e58b /gcc/cp
parent8ce4afa36d051920c2a67e54340e2a72fa33cbdd (diff)
downloadgcc-e89d6010089634063adfeeec679ac7fbf6afa4e6.zip
gcc-e89d6010089634063adfeeec679ac7fbf6afa4e6.tar.gz
gcc-e89d6010089634063adfeeec679ac7fbf6afa4e6.tar.bz2
decl.c (java_expand_body): Kill.
* decl.c (java_expand_body): Kill. (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill. * toplev.c (process_options): all frontends now do unit-at-a-time. * cgraphunit.c: update comments. (cgraph_expand_function): call passmanager dirrectly; emit thunks. * c-decl.c (finish_function): use cgraph_add_new_function. * method.c (use_thunk): Use tree_rest_of_compilation * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill. (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define. * cp-tree.h (expand_body): Kill. (emit_associated_thunks): Declare. * semantics.c (emit_associated_thunks): Export. (expand_body): Kill. * misc.c (gnat_expand_body): Kill. (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill. * f95-lang.c (gfc_expand_function): Kill. (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill. * function.c (expand_function_end): We are always unit-at-a-time. From-SVN: r128367
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog10
-rw-r--r--gcc/cp/cp-objcp-common.h4
-rw-r--r--gcc/cp/cp-tree.h2
-rw-r--r--gcc/cp/method.c2
-rw-r--r--gcc/cp/semantics.c19
5 files changed, 15 insertions, 22 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index cdbffb1..a73da49 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,13 @@
+2007-09-11 Jan Hubicka <jh@suse.cz>
+
+ * method.c (use_thunk): Use tree_rest_of_compilation
+ * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
+ (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
+ * cp-tree.h (expand_body): Kill.
+ (emit_associated_thunks): Declare.
+ * semantics.c (emit_associated_thunks): Export.
+ (expand_body): Kill.
+
2007-09-09 David Daney <ddaney@avtrex.com>
PR c++/33324
diff --git a/gcc/cp/cp-objcp-common.h b/gcc/cp/cp-objcp-common.h
index 8c8f933..dd23613 100644
--- a/gcc/cp/cp-objcp-common.h
+++ b/gcc/cp/cp-objcp-common.h
@@ -115,8 +115,8 @@ extern tree objcp_tsubst_copy_and_build (tree, tree, tsubst_flags_t,
#undef LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR
#define LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR cxx_callgraph_analyze_expr
-#undef LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION
-#define LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION expand_body
+#undef LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS
+#define LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS emit_associated_thunks
#undef LANG_HOOKS_MAKE_TYPE
#define LANG_HOOKS_MAKE_TYPE cxx_make_type
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 9bd8ed2..5efbdb7 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -4639,7 +4639,7 @@ extern tree finish_typeof (tree);
extern tree finish_offsetof (tree);
extern void finish_decl_cleanup (tree, tree);
extern void finish_eh_cleanup (tree);
-extern void expand_body (tree);
+extern void emit_associated_thunks (tree);
extern void finish_mem_initializers (tree);
extern tree check_template_template_default_arg (tree);
extern void expand_or_defer_fn (tree);
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index 2130454..05e21ba 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -523,7 +523,7 @@ use_thunk (tree thunk_fndecl, bool emit_p)
thunk_fndecl = finish_function (0);
tree_lowering_passes (thunk_fndecl);
- expand_body (thunk_fndecl);
+ tree_rest_of_compilation (thunk_fndecl);
}
pop_from_top_level ();
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 28fe481..b164102 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -54,7 +54,6 @@ along with GCC; see the file COPYING3. If not see
static tree maybe_convert_cond (tree);
static tree simplify_aggr_init_exprs_r (tree *, int *, void *);
-static void emit_associated_thunks (tree);
static tree finalize_nrv_r (tree *, int *, void *);
@@ -3094,7 +3093,7 @@ simplify_aggr_init_expr (tree *tp)
/* Emit all thunks to FN that should be emitted when FN is emitted. */
-static void
+void
emit_associated_thunks (tree fn)
{
/* When we use vcall offsets, we emit thunks with the virtual
@@ -3129,22 +3128,6 @@ emit_associated_thunks (tree fn)
/* Generate RTL for FN. */
void
-expand_body (tree fn)
-{
- /* Emit any thunks that should be emitted at the same time as FN. */
- emit_associated_thunks (fn);
-
- /* This function is only called from cgraph, or recursively from
- emit_associated_thunks. In neither case should we be currently
- generating trees for a function. */
- gcc_assert (function_depth == 0);
-
- c_expand_body (fn);
-}
-
-/* Generate RTL for FN. */
-
-void
expand_or_defer_fn (tree fn)
{
/* When the parser calls us after finishing the body of a template