Commit 25af8512 by Alexandre Oliva Committed by Alexandre Oliva

Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.

* Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
(cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
* cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
(TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
(flag_inline_trees): Moved declaration to ../tree-inline.h.
(walk_tree): Moved declaration to ../tree-inline.h.
(walk_tree_without_duplicates, copy_tree_r): Likewise.
(remap_save_expr): Likewise.
* decl.c: Include tree-inline.h.
(lang_mark_tree): Don't mark inlined_fns.
* decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
* optimize.c: Include tree-inline.h.
(optimize_inline_calls): Move declaration to ../tree.h, as
non-static.
(remap_decl): Use language-independent constructs and hooks.
(remap_block, copy_body_r, declare_return_variable): Likewise.
(inlinable_function_p): Likewise.  Don't test for
DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
no longer language-specific.
(optimize_inline_calls): Likewise.  Make it non-static.  Moved
call of dump_function to...
(optimize_function): Here...
(clone_body): New function, extracted from...
(maybe_clone_body): ... here.  Build decl_map locally and pass
it on to clone_body.
* pt.c, semantics.c: Include tree-inline.h.
* tree.c: Likewise.
(cp_walk_subtrees): New language-specific hook for tree inlining.
(cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
cp_is_overload_p, cp_auto_var_in_fn_p,
cp_copy_res_decl_for_inlining): Likewise.
(walk_tree): Move language-specific constructs into...
(cp_walk_subtrees): this new function.
(copy_tree_r): Use language-independent constructs and hooks.
(init_tree): Initialize tree inlining hooks.
(remap_save_expr): Adjust prototype so that the declaration
does not require the definition of splay_tree.

From-SVN: r46020
parent ffb0e73a
2001-10-04 Alexandre Oliva <aoliva@redhat.com>
* Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
(cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
* cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
(TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
(flag_inline_trees): Moved declaration to ../tree-inline.h.
(walk_tree): Moved declaration to ../tree-inline.h.
(walk_tree_without_duplicates, copy_tree_r): Likewise.
(remap_save_expr): Likewise.
* decl.c: Include tree-inline.h.
(lang_mark_tree): Don't mark inlined_fns.
* decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
* optimize.c: Include tree-inline.h.
(optimize_inline_calls): Move declaration to ../tree.h, as
non-static.
(remap_decl): Use language-independent constructs and hooks.
(remap_block, copy_body_r, declare_return_variable): Likewise.
(inlinable_function_p): Likewise. Don't test for
DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
no longer language-specific.
(optimize_inline_calls): Likewise. Make it non-static. Moved
call of dump_function to...
(optimize_function): Here...
(clone_body): New function, extracted from...
(maybe_clone_body): ... here. Build decl_map locally and pass
it on to clone_body.
* pt.c, semantics.c: Include tree-inline.h.
* tree.c: Likewise.
(cp_walk_subtrees): New language-specific hook for tree inlining.
(cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
cp_is_overload_p, cp_auto_var_in_fn_p,
cp_copy_res_decl_for_inlining): Likewise.
(walk_tree): Move language-specific constructs into...
(cp_walk_subtrees): this new function.
(copy_tree_r): Use language-independent constructs and hooks.
(init_tree): Initialize tree inlining hooks.
(remap_save_expr): Adjust prototype so that the declaration
does not require the definition of splay_tree.
2001-10-03 John David Anglin <dave@hiauly1.hia.nrc.ca> 2001-10-03 John David Anglin <dave@hiauly1.hia.nrc.ca>
* rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
......
...@@ -243,7 +243,7 @@ cp/lex.o: cp/lex.c $(CXX_TREE_H) cp/parse.h flags.h cp/lex.h c-pragma.h \ ...@@ -243,7 +243,7 @@ cp/lex.o: cp/lex.c $(CXX_TREE_H) cp/parse.h flags.h cp/lex.h c-pragma.h \
$(TM_P_H) $(TM_P_H)
cp/decl.o: cp/decl.c $(CXX_TREE_H) flags.h cp/lex.h cp/decl.h stack.h \ cp/decl.o: cp/decl.c $(CXX_TREE_H) flags.h cp/lex.h cp/decl.h stack.h \
output.h $(EXPR_H) except.h toplev.h hash.h $(GGC_H) $(RTL_H) \ output.h $(EXPR_H) except.h toplev.h hash.h $(GGC_H) $(RTL_H) \
cp/operators.def $(TM_P_H) cp/operators.def $(TM_P_H) tree-inline.h
cp/decl2.o: cp/decl2.c $(CXX_TREE_H) flags.h cp/lex.h cp/decl.h $(EXPR_H) \ cp/decl2.o: cp/decl2.c $(CXX_TREE_H) flags.h cp/lex.h cp/decl.h $(EXPR_H) \
output.h except.h toplev.h $(GGC_H) $(RTL_H) output.h except.h toplev.h $(GGC_H) $(RTL_H)
cp/typeck2.o: cp/typeck2.c $(CXX_TREE_H) flags.h toplev.h output.h $(TM_P_H) \ cp/typeck2.o: cp/typeck2.c $(CXX_TREE_H) flags.h toplev.h output.h $(TM_P_H) \
...@@ -261,7 +261,7 @@ cp/method.o: cp/method.c $(CXX_TREE_H) toplev.h $(GGC_H) $(RTL_H) $(EXPR_H) \ ...@@ -261,7 +261,7 @@ cp/method.o: cp/method.c $(CXX_TREE_H) toplev.h $(GGC_H) $(RTL_H) $(EXPR_H) \
cp/cvt.o: cp/cvt.c $(CXX_TREE_H) cp/decl.h flags.h toplev.h convert.h cp/cvt.o: cp/cvt.c $(CXX_TREE_H) cp/decl.h flags.h toplev.h convert.h
cp/search.o: cp/search.c $(CXX_TREE_H) stack.h flags.h toplev.h $(RTL_H) cp/search.o: cp/search.c $(CXX_TREE_H) stack.h flags.h toplev.h $(RTL_H)
cp/tree.o: cp/tree.c $(CXX_TREE_H) flags.h toplev.h $(GGC_H) $(RTL_H) \ cp/tree.o: cp/tree.c $(CXX_TREE_H) flags.h toplev.h $(GGC_H) $(RTL_H) \
insn-config.h integrate.h insn-config.h integrate.h tree-inline.h
cp/ptree.o: cp/ptree.c $(CXX_TREE_H) $(SYSTEM_H) cp/ptree.o: cp/ptree.c $(CXX_TREE_H) $(SYSTEM_H)
cp/rtti.o: cp/rtti.c $(CXX_TREE_H) flags.h toplev.h cp/rtti.o: cp/rtti.c $(CXX_TREE_H) flags.h toplev.h
cp/except.o: cp/except.c $(CXX_TREE_H) flags.h $(RTL_H) except.h toplev.h \ cp/except.o: cp/except.c $(CXX_TREE_H) flags.h $(RTL_H) except.h toplev.h \
...@@ -270,14 +270,15 @@ cp/expr.o: cp/expr.c $(CXX_TREE_H) $(RTL_H) flags.h $(EXPR_H) toplev.h \ ...@@ -270,14 +270,15 @@ cp/expr.o: cp/expr.c $(CXX_TREE_H) $(RTL_H) flags.h $(EXPR_H) toplev.h \
except.h $(TM_P_H) except.h $(TM_P_H)
cp/xref.o: cp/xref.c $(CXX_TREE_H) input.h toplev.h cp/xref.o: cp/xref.c $(CXX_TREE_H) input.h toplev.h
cp/pt.o: cp/pt.c $(CXX_TREE_H) cp/decl.h cp/parse.h cp/lex.h toplev.h \ cp/pt.o: cp/pt.c $(CXX_TREE_H) cp/decl.h cp/parse.h cp/lex.h toplev.h \
$(GGC_H) $(RTL_H) except.h $(GGC_H) $(RTL_H) except.h tree-inline.h
cp/error.o: cp/error.c $(CXX_TREE_H) toplev.h diagnostic.h flags.h real.h cp/error.o: cp/error.c $(CXX_TREE_H) toplev.h diagnostic.h flags.h real.h
cp/repo.o: cp/repo.c $(CXX_TREE_H) toplev.h $(GGC_H) diagnostic.h cp/repo.o: cp/repo.c $(CXX_TREE_H) toplev.h $(GGC_H) diagnostic.h
cp/semantics.o: cp/semantics.c $(CXX_TREE_H) cp/lex.h except.h toplev.h \ cp/semantics.o: cp/semantics.c $(CXX_TREE_H) cp/lex.h except.h toplev.h \
flags.h $(GGC_H) debug.h output.h $(RTL_H) $(TIMEVAR_H) $(EXPR_H) flags.h $(GGC_H) debug.h output.h $(RTL_H) $(TIMEVAR_H) $(EXPR_H) \
tree-inline.h
cp/dump.o: cp/dump.c $(CXX_TREE_H) c-dump.h cp/dump.o: cp/dump.c $(CXX_TREE_H) c-dump.h
cp/optimize.o: cp/optimize.c $(CXX_TREE_H) rtl.h integrate.h insn-config.h \ cp/optimize.o: cp/optimize.c $(CXX_TREE_H) rtl.h integrate.h insn-config.h \
input.h $(PARAMS_H) debug.h input.h $(PARAMS_H) debug.h tree-inline.h
cp/mangle.o: cp/mangle.c $(CXX_TREE_H) toplev.h cp/mangle.o: cp/mangle.c $(CXX_TREE_H) toplev.h
cp/parse.o: cp/parse.c $(CXX_TREE_H) flags.h cp/lex.h except.h output.h \ cp/parse.o: cp/parse.c $(CXX_TREE_H) flags.h cp/lex.h except.h output.h \
......
...@@ -1758,10 +1758,6 @@ struct lang_decl ...@@ -1758,10 +1758,6 @@ struct lang_decl
/* In a FUNCTION_DECL, this is DECL_CLONED_FUNCTION. */ /* In a FUNCTION_DECL, this is DECL_CLONED_FUNCTION. */
tree cloned_function; tree cloned_function;
/* In a FUNCTION_DECL, these are function data which is to be kept
as long as FUNCTION_DECL is kept. */
tree inlined_fns;
union union
{ {
tree sorted_fields; tree sorted_fields;
...@@ -1778,10 +1774,6 @@ struct lang_decl ...@@ -1778,10 +1774,6 @@ struct lang_decl
#define DEFARG_POINTER(NODE) (DEFAULT_ARG_CHECK(NODE)->identifier.id.str) #define DEFARG_POINTER(NODE) (DEFAULT_ARG_CHECK(NODE)->identifier.id.str)
/* Non-zero if NODE is a _DECL with TREE_READONLY set. */
#define TREE_READONLY_DECL_P(NODE) \
(TREE_READONLY (NODE) && DECL_P (NODE))
/* DECL_NEEDED_P holds of a declaration when we need to emit its /* DECL_NEEDED_P holds of a declaration when we need to emit its
definition. This is true when the back-end tells us that definition. This is true when the back-end tells us that
the symbol has been referenced in the generated code. If, however, the symbol has been referenced in the generated code. If, however,
...@@ -1888,10 +1880,6 @@ struct lang_decl ...@@ -1888,10 +1880,6 @@ struct lang_decl
#define DECL_CLONED_FUNCTION(NODE) \ #define DECL_CLONED_FUNCTION(NODE) \
(DECL_LANG_SPECIFIC (NODE)->cloned_function) (DECL_LANG_SPECIFIC (NODE)->cloned_function)
/* List of FUNCION_DECLs inlined into this function's body. */
#define DECL_INLINED_FNS(NODE) \
(DECL_LANG_SPECIFIC (NODE)->inlined_fns)
/* Nonzero if NODE has DECL_DISCRIMINATOR and not DECL_ACCESS. */ /* Nonzero if NODE has DECL_DISCRIMINATOR and not DECL_ACCESS. */
#define DECL_DISCRIMINATOR_P(NODE) \ #define DECL_DISCRIMINATOR_P(NODE) \
(TREE_CODE (NODE) == VAR_DECL \ (TREE_CODE (NODE) == VAR_DECL \
...@@ -3262,13 +3250,6 @@ extern int flag_implicit_templates; ...@@ -3262,13 +3250,6 @@ extern int flag_implicit_templates;
extern int flag_weak; extern int flag_weak;
/* 0 if we should not perform inlining.
1 if we should expand functions calls inline at the tree level.
2 if we should consider *all* functions to be inline
candidates. */
extern int flag_inline_trees;
/* Nonzero if we're done parsing and into end-of-file activities. */ /* Nonzero if we're done parsing and into end-of-file activities. */
extern int at_eof; extern int at_eof;
...@@ -4197,18 +4178,9 @@ extern void debug_binfo PARAMS ((tree)); ...@@ -4197,18 +4178,9 @@ extern void debug_binfo PARAMS ((tree));
extern tree build_dummy_object PARAMS ((tree)); extern tree build_dummy_object PARAMS ((tree));
extern tree maybe_dummy_object PARAMS ((tree, tree *)); extern tree maybe_dummy_object PARAMS ((tree, tree *));
extern int is_dummy_object PARAMS ((tree)); extern int is_dummy_object PARAMS ((tree));
extern tree walk_tree PARAMS ((tree *,
walk_tree_fn,
void *,
htab_t));
extern tree walk_tree_without_duplicates PARAMS ((tree *,
walk_tree_fn,
void *));
extern tree copy_tree_r PARAMS ((tree *, int *, void *));
extern const struct attribute_spec cp_attribute_table[]; extern const struct attribute_spec cp_attribute_table[];
extern tree make_ptrmem_cst PARAMS ((tree, tree)); extern tree make_ptrmem_cst PARAMS ((tree, tree));
extern tree cp_build_qualified_type_real PARAMS ((tree, int, int)); extern tree cp_build_qualified_type_real PARAMS ((tree, int, int));
extern void remap_save_expr PARAMS ((tree *, splay_tree, tree, int *));
#define cp_build_qualified_type(TYPE, QUALS) \ #define cp_build_qualified_type(TYPE, QUALS) \
cp_build_qualified_type_real ((TYPE), (QUALS), /*complain=*/1) cp_build_qualified_type_real ((TYPE), (QUALS), /*complain=*/1)
extern tree build_shared_int_cst PARAMS ((int)); extern tree build_shared_int_cst PARAMS ((int));
......
...@@ -35,6 +35,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -35,6 +35,7 @@ Boston, MA 02111-1307, USA. */
#include "expr.h" #include "expr.h"
#include "flags.h" #include "flags.h"
#include "cp-tree.h" #include "cp-tree.h"
#include "tree-inline.h"
#include "decl.h" #include "decl.h"
#include "lex.h" #include "lex.h"
#include "output.h" #include "output.h"
...@@ -14479,7 +14480,6 @@ lang_mark_tree (t) ...@@ -14479,7 +14480,6 @@ lang_mark_tree (t)
ggc_mark_tree (ld->befriending_classes); ggc_mark_tree (ld->befriending_classes);
ggc_mark_tree (ld->context); ggc_mark_tree (ld->context);
ggc_mark_tree (ld->cloned_function); ggc_mark_tree (ld->cloned_function);
ggc_mark_tree (ld->inlined_fns);
if (TREE_CODE (t) == TYPE_DECL) if (TREE_CODE (t) == TYPE_DECL)
ggc_mark_tree (ld->u.sorted_fields); ggc_mark_tree (ld->u.sorted_fields);
else if (TREE_CODE (t) == FUNCTION_DECL else if (TREE_CODE (t) == FUNCTION_DECL
......
...@@ -378,13 +378,6 @@ int flag_weak = 1; ...@@ -378,13 +378,6 @@ int flag_weak = 1;
int flag_use_cxa_atexit; int flag_use_cxa_atexit;
/* 0 if we should not perform inlining.
1 if we should expand functions calls inline at the tree level.
2 if we should consider *all* functions to be inline
candidates. */
int flag_inline_trees = 0;
/* Maximum template instantiation depth. This limit is rather /* Maximum template instantiation depth. This limit is rather
arbitrary, but it exists to limit the time it takes to notice arbitrary, but it exists to limit the time it takes to notice
infinite template instantiations. */ infinite template instantiations. */
......
...@@ -29,10 +29,10 @@ Boston, MA 02111-1307, USA. */ ...@@ -29,10 +29,10 @@ Boston, MA 02111-1307, USA. */
#include "config.h" #include "config.h"
#include "system.h" #include "system.h"
#include "obstack.h" #include "obstack.h"
#include "tree.h" #include "tree.h"
#include "flags.h" #include "flags.h"
#include "cp-tree.h" #include "cp-tree.h"
#include "tree-inline.h"
#include "decl.h" #include "decl.h"
#include "parse.h" #include "parse.h"
#include "lex.h" #include "lex.h"
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include "system.h" #include "system.h"
#include "tree.h" #include "tree.h"
#include "cp-tree.h" #include "cp-tree.h"
#include "tree-inline.h"
#include "except.h" #include "except.h"
#include "lex.h" #include "lex.h"
#include "toplev.h" #include "toplev.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment