diff options
author | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-05 02:49:16 +0000 |
---|---|---|
committer | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-05 02:49:16 +0000 |
commit | 1431bff66dcbda6e40f7b502fa82c7eae209ed2c (patch) | |
tree | 2f6c9d765b33ae23a613a61116ed9e165f3ee6d9 /gcc/tree-inline.c | |
parent | 1e3b023ca8a1e3c71fbc30d4bb9b84cd1623903d (diff) | |
download | gcc-1431bff66dcbda6e40f7b502fa82c7eae209ed2c.tar.gz |
* Makefile.in (OBJS): Added tree-inline.o.
(c-common.o): Depend on tree-inline.h.
(tree-inline.o): New target.
* c-common.c: Include tree-inline.h.
(c_mark_lang_decl): Don't mark saved_tree.
(c_common_lang_init): Set lang_anon_aggr_type_p.
* c-common.h (walk_tree_fn, DECL_SAVED_TREE): Moved to tree.h.
(struct c_lang_decl): Moved saved_tree to tree_decl.
* ggc-common.c: Mark saved_tree and inlined_fns of FUNCTION_DECLs.
* integrate.h (function_attribute_inlinable_p): Declare it.
* integrate.c (function_attribute_inlinable_p): Export it.
* tree-inline.c: New file. Define variables declared in...
* tree-inline.h: New file. Declare functions to be moved to
tree-inline.c. Define macros and declare types and hooks for
language-specific tree inlining.
(flag_inline_trees): Moved definition from cp/decl2.c.
* tree.h (walk_tree_fn, DECL_SAVED_TREE): Moved from c-common.h.
(TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved from cp/cp-tree.h.
(struct tree_decl): Moved saved_tree from c_lang_decl and
inlined_fns from C++'s lang_decl.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46021 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r-- | gcc/tree-inline.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c new file mode 100644 index 00000000000..3679e20df45 --- /dev/null +++ b/gcc/tree-inline.c @@ -0,0 +1,43 @@ +/* Control and data flow functions for trees. + Copyright 2001 Free Software Foundation, Inc. + Contributed by Alexandre Oliva <aoliva@redhat.com> + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU CC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU CC; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +#include "config.h" +#include "system.h" +#include "tree.h" +#include "tree-inline.h" + +/* Definitions of language hooks. */ + +treeopt_walk_subtrees_type *lang_walk_subtrees; +treeopt_cannot_inline_tree_fn_type *lang_cannot_inline_tree_fn; +treeopt_disregard_inline_limits_type *lang_disregard_inline_limits; +treeopt_add_pending_fn_decls_type *lang_add_pending_fn_decls; +treeopt_tree_chain_matters_p_type *lang_tree_chain_matters_p; +treeopt_auto_var_in_fn_p_type *lang_auto_var_in_fn_p; +treeopt_copy_res_decl_for_inlining_type *lang_copy_res_decl_for_inlining; +treeopt_anon_aggr_type_p *lang_anon_aggr_type_p; + +/* 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; |