On 12/1/2014 11:57 AM, Jeff Law wrote:
Prior to reload (ie, in DSE1) there's a bit of magic in that we do not
set frame_read on call insns. That may in fact be wrong and possibly
the source of the problem.
/* This field is only used for the processing of const functions.
These functions cannot read memory, but they can read the stack
because that is where they may get their parms. We need to be
this conservative because, like the store motion pass, we don't
consider CALL_INSN_FUNCTION_USAGE when processing call insns.
Moreover, we need to distinguish two cases:
1. Before reload (register elimination), the stores related to
outgoing arguments are stack pointer based and thus deemed
of non-constant base in this pass. This requires special
handling but also means that the frame pointer based stores
need not be killed upon encountering a const function call.
The above is wrong for sibcalls. Sibcall arguments are relative to the
incoming
argument pointer. Is this always the frame pointer?
If that is the case, then it may be possible to eliminate stack based
stores when
we have a sibcall before reload.
if (reload_completed || SIBLING_CALL_P (insn))
insn_info->frame_read = true;
This works.
Dave
--
John David Anglin dave.ang...@bell.net