diff options
author | Jason Merrill <jason@casey.cygnus.com> | 2000-04-25 23:31:50 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2000-04-25 19:31:50 -0400 |
commit | 39b0dce71c324c057e2fdc49fbc3b83159eccca1 (patch) | |
tree | d58047b2f46568a534cc768e8a047a2ce53a3efd | |
parent | 89a75b6d831bfdf05bbf383cb6929a8bb2d2cb0a (diff) | |
download | gcc-39b0dce71c324c057e2fdc49fbc3b83159eccca1.zip gcc-39b0dce71c324c057e2fdc49fbc3b83159eccca1.tar.gz gcc-39b0dce71c324c057e2fdc49fbc3b83159eccca1.tar.bz2 |
calls.c (expand_call): Use get_callee_fndecl.
* calls.c (expand_call): Use get_callee_fndecl.
* print-tree.c (print_node): Print the chain of an _EXPR.
From-SVN: r33426
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/calls.c | 55 | ||||
-rw-r--r-- | gcc/print-tree.c | 1 |
3 files changed, 33 insertions, 29 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9ec1116..a428caa 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2000-04-26 Jason Merrill <jason@casey.cygnus.com> + + * calls.c (expand_call): Use get_callee_fndecl. + + * print-tree.c (print_node): Print the chain of an _EXPR. + Tue Apr 25 16:16:04 2000 Andrew MacLeod <amacleod@cygnus.com> Jim Wilson <wilson@cygnus.com> Andrew Haley <aph@cygnus.com> diff --git a/gcc/calls.c b/gcc/calls.c index 12dea75..c9814c7 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -1982,44 +1982,41 @@ expand_call (exp, target, ignore) /* See if we can find a DECL-node for the actual function. As a result, decide whether this is a call to an integrable function. */ - p = TREE_OPERAND (exp, 0); - if (TREE_CODE (p) == ADDR_EXPR) + fndecl = get_callee_fndecl (exp); + if (fndecl) { - fndecl = TREE_OPERAND (p, 0); - if (TREE_CODE (fndecl) != FUNCTION_DECL) - fndecl = 0; - else + if (!flag_no_inline + && fndecl != current_function_decl + && DECL_INLINE (fndecl) + && DECL_SAVED_INSNS (fndecl) + && DECL_SAVED_INSNS (fndecl)->inlinable) + is_integrable = 1; + else if (! TREE_ADDRESSABLE (fndecl)) { - if (!flag_no_inline - && fndecl != current_function_decl - && DECL_INLINE (fndecl) - && DECL_SAVED_INSNS (fndecl) - && DECL_SAVED_INSNS (fndecl)->inlinable) - is_integrable = 1; - else if (! TREE_ADDRESSABLE (fndecl)) - { - /* In case this function later becomes inlinable, - record that there was already a non-inline call to it. + /* In case this function later becomes inlinable, + record that there was already a non-inline call to it. - Use abstraction instead of setting TREE_ADDRESSABLE - directly. */ - if (DECL_INLINE (fndecl) && warn_inline && !flag_no_inline - && optimize > 0) - { - warning_with_decl (fndecl, "can't inline call to `%s'"); - warning ("called from here"); - } - mark_addressable (fndecl); + Use abstraction instead of setting TREE_ADDRESSABLE + directly. */ + if (DECL_INLINE (fndecl) && warn_inline && !flag_no_inline + && optimize > 0) + { + warning_with_decl (fndecl, "can't inline call to `%s'"); + warning ("called from here"); } - - flags |= flags_from_decl_or_type (fndecl); + mark_addressable (fndecl); } + + flags |= flags_from_decl_or_type (fndecl); } /* If we don't have specific function to call, see if we have a attributes set in the type. */ - if (fndecl == 0) - flags |= flags_from_decl_or_type (TREE_TYPE (TREE_TYPE (p))); + else + { + p = TREE_OPERAND (exp, 0); + flags |= flags_from_decl_or_type (TREE_TYPE (TREE_TYPE (p))); + } #ifdef REG_PARM_STACK_SPACE #ifdef MAYBE_REG_PARM_STACK_SPACE diff --git a/gcc/print-tree.c b/gcc/print-tree.c index 7ccf67e..e86a51c 100644 --- a/gcc/print-tree.c +++ b/gcc/print-tree.c @@ -613,6 +613,7 @@ print_node (file, prefix, node, indent) EXPR_WFL_FILENAME (node) : "(no file info)"), EXPR_WFL_LINENO (node), EXPR_WFL_COLNO (node)); } + print_node (file, "chain", BLOCK_CHAIN (node), indent + 4); break; case 'c': |