-
- Downloads
re PR rtl-optimization/38245 (stack corruption when a call is removed but not...
re PR rtl-optimization/38245 (stack corruption when a call is removed but not the outgoing argument pushes) PR rtl-optimization/38245 * calls.c (expand_call): Add stack arguments to CALL_INSN_FUNCTION_USAGE even for pure calls (when ACCUMULATE_OUTGOING_ARGS) and even for args partially passed in regs and partially in memory or BLKmode arguments. (emit_library_call_value_1): Add stack arguments to CALL_INSN_FUNCTION_USAGE even for pure calls (when ACCUMULATE_OUTGOING_ARGS). * dce.c: Include tm_p.h. (find_call_stack_args): New function. (deletable_insn_p): Call it for CALL_P insns. Add ARG_STORES argument. (mark_insn): Call find_call_stack_args for CALL_Ps. (prescan_insns_for_dce): Walk insns backwards in bb rather than forwards. Allocate and free arg_stores bitmap if needed, pass it down to deletable_insn_p, don't mark stores set in arg_stores bitmap, clear the bitmap at the beginning of each bb. * Makefile.in (dce.o): Depend on $(TM_P_H). * gcc.dg/pr38245-3.c: New test. * gcc.dg/pr38245-3.h: New file. * gcc.dg/pr38245-4.c: New file. * gcc.dg/pr38364.c: New test. From-SVN: r143387
Showing
- gcc/ChangeLog 21 additions, 0 deletionsgcc/ChangeLog
- gcc/Makefile.in 1 addition, 1 deletiongcc/Makefile.in
- gcc/calls.c 25 additions, 22 deletionsgcc/calls.c
- gcc/dce.c 290 additions, 14 deletionsgcc/dce.c
- gcc/testsuite/ChangeLog 8 additions, 0 deletionsgcc/testsuite/ChangeLog
- gcc/testsuite/gcc.dg/pr38245-3.c 112 additions, 0 deletionsgcc/testsuite/gcc.dg/pr38245-3.c
- gcc/testsuite/gcc.dg/pr38245-3.h 35 additions, 0 deletionsgcc/testsuite/gcc.dg/pr38245-3.h
- gcc/testsuite/gcc.dg/pr38245-4.c 107 additions, 0 deletionsgcc/testsuite/gcc.dg/pr38245-4.c
- gcc/testsuite/gcc.dg/pr38364.c 79 additions, 0 deletionsgcc/testsuite/gcc.dg/pr38364.c
Loading
Please register or sign in to comment