diff options
author | liuhongt <hongtao.liu@intel.com> | 2021-06-01 09:00:57 +0800 |
---|---|---|
committer | liuhongt <hongtao.liu@intel.com> | 2021-06-07 10:25:03 +0800 |
commit | 16465ceb06cc1f65cfca3c0eb2c1ee27ab03bdfd (patch) | |
tree | 7afa0001810636d4623eff17ba18d988d79b4ac4 /gcc/df-scan.c | |
parent | 7d6987e90d1181de8dc51f9ba2313052faea080e (diff) | |
download | gcc-16465ceb06cc1f65cfca3c0eb2c1ee27ab03bdfd.zip gcc-16465ceb06cc1f65cfca3c0eb2c1ee27ab03bdfd.tar.gz gcc-16465ceb06cc1f65cfca3c0eb2c1ee27ab03bdfd.tar.bz2 |
CALL_INSN may not be a real function call.
Use "used" flag for CALL_INSN to indicate it's a fake call. If it's a
fake call, it won't have its own function stack.
gcc/ChangeLog
PR target/82735
* df-scan.c (df_get_call_refs): When call_insn is a fake call,
it won't use stack pointer reg.
* final.c (leaf_function_p): When call_insn is a fake call, it
won't affect caller as a leaf function.
* reg-stack.c (callee_clobbers_any_stack_reg): New.
(subst_stack_regs): When call_insn doesn't clobber any stack
reg, don't clear the arguments.
* rtl.c (shallow_copy_rtx): Don't clear flag used when orig is
a insn.
* shrink-wrap.c (requires_stack_frame_p): No need for stack
frame for a fake call.
* rtl.h (FAKE_CALL_P): New macro.
Diffstat (limited to 'gcc/df-scan.c')
-rw-r--r-- | gcc/df-scan.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/df-scan.c b/gcc/df-scan.c index 6691c3e..1268536 100644 --- a/gcc/df-scan.c +++ b/gcc/df-scan.c @@ -3090,7 +3090,8 @@ df_get_call_refs (class df_collection_rec *collection_rec, for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) { - if (i == STACK_POINTER_REGNUM) + if (i == STACK_POINTER_REGNUM + && !FAKE_CALL_P (insn_info->insn)) /* The stack ptr is used (honorarily) by a CALL insn. */ df_ref_record (DF_REF_BASE, collection_rec, regno_reg_rtx[i], NULL, bb, insn_info, DF_REF_REG_USE, |