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?