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/dse.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'gcc/dse.c') diff --git a/gcc/dse.c b/gcc/dse.c index eff4a39..318bbc9 100644 --- a/gcc/dse.c +++ b/gcc/dse.c @@ -2518,14 +2518,8 @@ scan_insn (bb_info_t bb_info, rtx insn) const_call = RTL_CONST_CALL_P (insn); if (!const_call) { - rtx call = PATTERN (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)) - && GET_CODE (XEXP (XEXP (call, 0), 0)) == SYMBOL_REF) + rtx call = get_call_rtx_from (insn); + if (call && GET_CODE (XEXP (XEXP (call, 0), 0)) == SYMBOL_REF) { rtx symbol = XEXP (XEXP (call, 0), 0); if (SYMBOL_REF_DECL (symbol) -- cgit v1.1