OSDN Git Service

PR rtl-optimization/38245
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 15 Jan 2009 08:07:38 +0000 (08:07 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 15 Jan 2009 08:07:38 +0000 (08:07 +0000)
commiteb940a48785ef5ef01194b20c806c4e80d572bfa
treedf30f7de379a5cadc80eb495456de5a3b9f9d10b
parent26f62ff4d65febe0fd7d07e1c262abb1e65bb6f7
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@143387 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/Makefile.in
gcc/calls.c
gcc/dce.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr38245-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr38245-3.h [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr38245-4.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr38364.c [new file with mode: 0644]