------- Comment #10 from jakub at gcc dot gnu dot org 2008-12-05 11:07 ------- I guess for !ACCUMULATE_OUTGOING_ARGS DCE of calls having stack arguments generally shouldn't be an issue (unless they pop the stack themselves, don't remember if it is easily determinable in generic way), worst case where will be some pushes and some pops or stack additions left around. For ACCUMULATE_OUTGOING_ARGS you could use: (expr_list:REG_DEP_TRUE (use (mem:SI (reg/f:SI 7 sp) [0 S4 A8])) (expr_list:REG_DEP_TRUE (use (mem:SI (plus:SI (reg/f:SI 7 sp) (const_int 4 [0x4])) [0 S4 A8])) (nil)))) from the CALL_INSN, just see if you can find safely and remove also the stores to those stack locations, if yes, remove them together with the call, if not, don't DCE the call either.
-- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38245