summaryrefslogtreecommitdiff
path: root/gcc/tree-inline.h
Commit message (Collapse)AuthorAgeFilesLines
* * langhooks.h: New file.aoliva2001-10-081-98/+0
| | | | | | | | | | | | | | | | | | | | | | | * Makefile.in (OBJS): Added langhooks.o. (c-lang.o): Depend on langhooks.h. (c-common.o): Don't depend on tree-inline.h. (tree-inline.o): Depend on toplev.h. (langhooks.o): New rule. * c-common.c: Don't include tree-inline.h. (c_mark_lang_decl): Mark argument c as unused. (c_common_lang_init): Don't initialize hooks here. * c-lang.c: Include langhooks.h, then override some macros. (lang_hooks): Initialize with macros in langhooks.h. (c_init): Don't initialize hooks here. * toplev.c (struct lang_hooks_for_tree_inlining): New struct. (struct lang_hooks): Add tree_inlining. Refer to langhooks.h. * tree-inline.c: Include toplev.h. Don't define hook variables. * tree-inline.h: Don't define hook types nor declare hook variables. Move macros to... * langhooks.c: ... new file, as functions. Adjust all callers. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46096 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (c-decl.o): Depend on tree-inline.h.aoliva2001-10-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (c-lang.o): Likewise, as well as insn-config.h and integrate.h. * c-decl.c: Include tree-inline.h. (c_expand_body): Call optimize_inline_calls. Determine whether a function is inlinable upfront, and only clear DECL_SAVED_TREE, DECL_INITIAL and DECL_ARGUMENTS if it isn't. * c-lang.c: Include tree-inline.h, insn-config.h and integrate.h. (c_disregard_inline_limits): New function. (inline_forbidden_p, c_cannot_inline_tree_fn): Likewise. (c_post_options): Enable tree inlining if inlining is enabled. Don't inline trees when instrumenting functions. (c_init): Initialize lang_disregard_inline_limits and lang_cannot_inline_tree_fn. * tree-inline.c (initialize_inlined_parameters): Handle calls with fewer arguments than declared parameters, and fewer parameters than passed arguments. Don't assume value is a DECL. (declare_return_variable): Convert return value back to the original type, if it was promoted. (tree_inlinable_function_p): New function. (inlinable_function_p): Don't look at DECL_INLINE if we're inlining all functions. Make it work with a NULL id. Re-check DECL_UNINLINABLE after language-specific checks. (varargs_function_p): Move back to cp/tree.c. * tree-inline.h (tree_inlinable_function_p): Declare it. (varargs_function_p): Removed declaration. * integrate.h (function_attribute_inlinable_p): Declare it. * integrate.c (function_attribute_inlinable_p): Export it. (save_for_inline): Don't bother to prepare argvec when not inlining. * cse.c (check_for_label_ref): Don't check deleted labels. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46025 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (OBJS): Added tree-inline.o.aoliva2001-10-051-0/+139
(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