summaryrefslogtreecommitdiff
path: root/gcc/var-tracking.c
diff options
context:
space:
mode:
authorsteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-16 22:05:17 +0000
committersteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-16 22:05:17 +0000
commitcf7fb72d3b3a94549e5b32d2ef34863c5477d758 (patch)
treeeafbca96b0b0771fa77620d1cff5cfc0a8a8b8be /gcc/var-tracking.c
parent01dd0067b62af36b93ffcd6a9ff9070a64ed1b45 (diff)
downloadgcc-cf7fb72d3b3a94549e5b32d2ef34863c5477d758.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192516 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/var-tracking.c')
-rw-r--r--gcc/var-tracking.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c
index 65116c287e9..25973a9776e 100644
--- a/gcc/var-tracking.c
+++ b/gcc/var-tracking.c
@@ -5897,9 +5897,8 @@ static rtx call_arguments;
static void
prepare_call_arguments (basic_block bb, rtx insn)
{
- rtx link, x;
+ rtx link, x, call;
rtx prev, cur, next;
- rtx call = PATTERN (insn);
rtx this_arg = NULL_RTX;
tree type = NULL_TREE, t, fndecl = NULL_TREE;
tree obj_type_ref = NULL_TREE;
@@ -5908,11 +5907,8 @@ prepare_call_arguments (basic_block bb, rtx insn)
memset (&args_so_far_v, 0, sizeof (args_so_far_v));
args_so_far = pack_cumulative_args (&args_so_far_v);
- 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 (insn);
+ if (call)
{
if (GET_CODE (XEXP (XEXP (call, 0), 0)) == SYMBOL_REF)
{
@@ -6186,12 +6182,8 @@ prepare_call_arguments (basic_block bb, rtx insn)
}
call_arguments = prev;
- x = PATTERN (insn);
- if (GET_CODE (x) == PARALLEL)
- x = XVECEXP (x, 0, 0);
- if (GET_CODE (x) == SET)
- x = SET_SRC (x);
- if (GET_CODE (x) == CALL && MEM_P (XEXP (x, 0)))
+ x = get_call_rtx_from (insn);
+ if (x)
{
x = XEXP (XEXP (x, 0), 0);
if (GET_CODE (x) == SYMBOL_REF)