From 7f4db7c80779ecbc57d1146654daf0acfe18de66 Mon Sep 17 00:00:00 2001 From: rus Date: Mon, 9 Nov 2009 20:58:24 +0000 Subject: merge from trunk git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/profile-stdlib@154052 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/calls.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'gcc/calls.c') diff --git a/gcc/calls.c b/gcc/calls.c index f28fb513ce2..13167a620a4 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -39,6 +39,7 @@ along with GCC; see the file COPYING3. If not see #include "sbitmap.h" #include "langhooks.h" #include "target.h" +#include "debug.h" #include "cgraph.h" #include "except.h" #include "dbgcnt.h" @@ -394,6 +395,11 @@ emit_call_1 (rtx funexp, tree fntree ATTRIBUTE_UNUSED, tree fndecl ATTRIBUTE_UNU SIBLING_CALL_P (call_insn) = ((ecf_flags & ECF_SIBCALL) != 0); + /* Record debug information for virtual calls. */ + if (flag_enable_icf_debug && fndecl == NULL) + (*debug_hooks->virtual_call_token) (CALL_EXPR_FN (fntree), + INSN_UID (call_insn)); + /* Restore this now, so that we do defer pops for this call's args if the context of the call as a whole permits. */ inhibit_defer_pop = old_inhibit_defer_pop; @@ -3014,7 +3020,10 @@ expand_call (tree exp, rtx target, int ignore) } else if (TYPE_MODE (rettype) == BLKmode) { - target = copy_blkmode_from_reg (target, valreg, rettype); + rtx val = valreg; + if (GET_MODE (val) != BLKmode) + val = avoid_likely_spilled_reg (val); + target = copy_blkmode_from_reg (target, val, rettype); /* We can not support sibling calls for this case. */ sibcall_failure = 1; -- cgit v1.2.1