diff options
Diffstat (limited to 'gcc/calls.c')
-rw-r--r-- | gcc/calls.c | 11 |
1 files changed, 10 insertions, 1 deletions
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; |