On 28-04-14 12:26, Richard Sandiford wrote:
Tom de Vries <tom_devr...@mentor.com> writes:
On 27-04-14 12:27, Richard Sandiford wrote:
Tom de Vries <tom_devr...@mentor.com> writes:
mips_emit_call_insn (rtx pattern, rtx orig_addr, rtx addr, bool lazy_p)
{
rtx insn, reg;
- insn = emit_call_insn (pattern);
+ emit_call_insn (pattern);
+ insn = last_call_insn ();
if (TARGET_MIPS16 && mips_use_pic_fn_addr_reg_p (orig_addr))
{
This change isn't necessary; emit_call_insn is defined to return a CALL_INSN.
I dropped this change, as well as the change in the untyped_call expand, I
realized it's unnecessary.
Why was the untyped_call part unnecessary?
The define_expand "untyped_call" uses GEN_CALL, which uses define_expand "call",
which uses mips_expand_call, which uses mips_emit_call_insn, which adds the
required clobbers.
I'm a bit surprised that it doesn't work at -O1 for a simple test
like this though. What goes wrong?
AFAIU now the problem is that the optimization doesn't trigger for -O0
and -01, because the register allocator behaves more conservatively.
Hmm, is that just because -fcaller-saves is -O2 and above?
If so,
should -fuse-caller-save imply -fcaller-saves?
Thanks,
Richard