From da4fdf2d3ff45366d9378882ad1646306ceee305 Mon Sep 17 00:00:00 2001 From: Steven Bosscher Date: Tue, 16 Oct 2012 22:05:17 +0000 Subject: rtl.h (get_call_rtx_from): New prototype. * rtl.h (get_call_rtx_from): New prototype. * rtlanal.c (get_call_rtx_from): New function. * calls.c (emit_call_1): Use it. * dse.c (scan_insn): Likewise * dwarf2out.c (dwarf2out_var_location): Likewise. * sched-deps.c (call_may_noreturn_p): Likewise. * var-tracking.c (prepare_call_arguments): Likewise. * config/sh/sh.c (sh_adjust_cost): Likewise. From-SVN: r192516 --- gcc/calls.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'gcc/calls.c') diff --git a/gcc/calls.c b/gcc/calls.c index 2180a62..d4ef639 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -384,13 +384,8 @@ emit_call_1 (rtx funexp, tree fntree ATTRIBUTE_UNUSED, tree fndecl ATTRIBUTE_UNU /* Some target create a fresh MEM instead of reusing the one provided above. Set its MEM_EXPR. */ - call = PATTERN (call_insn); - if (GET_CODE (call) == PARALLEL) - call = XVECEXP (call, 0, 0); - if (GET_CODE (call) == SET) - call = SET_SRC (call); - if (GET_CODE (call) == CALL - && MEM_P (XEXP (call, 0)) + call = get_call_rtx_from (call_insn); + if (call && MEM_EXPR (XEXP (call, 0)) == NULL_TREE && MEM_EXPR (funmem) != NULL_TREE) set_mem_expr (XEXP (call, 0), MEM_EXPR (funmem)); -- cgit v1.1