Hi, Ian,
ELIMINATE_REGS and TARGET_CAN_ELIMINATE are set correctly. As far as I
understand from further investigation, at some point during
compilation, the argument pointer register is used, then the
expand_prologue() produces INSNs including "push argp" (as "argp" is
presently defined as a general-purpose non-scratch register). Then,
during reload phase, such instruction prevents "argp" from being
eliminated, as it modifies SP and uses ARGP (ref_outside_mem) at the
same time:
if (ep->previous_offset != ep->offset && ep->ref_outside_mem)
ep->can_eliminate = 0;
Is there a way to prevent prologue instructions (e.g. saving ARGP/FP
before elimination phase) from affecting elimination? Maybe,
expand_prologue() should behave differently depending on whether the
elimination has completed?
--
Best regards,
Ivan Shcherbakov mailto:[email protected]
TU Kaiserslautern, Germany
Department of Real-Time Systems