Re: -fuse-caller-save - Enable for MIPS

2014-04-28 Thread Richard Sandiford
Tom de Vries writes: >> If so, >> should -fuse-caller-save imply -fcaller-saves? > > I don't think it's strictly necessary, but I can make a patch if required. Implying -fcaller-saves seems better to me, since "-O -fuse-caller-save" looks like it should enable the new optimisation. It's not my c

Re: -fuse-caller-save - Enable for MIPS

2014-04-28 Thread Richard Sandiford
Tom de Vries writes: > On 28-04-14 12:26, Richard Sandiford wrote: >> Tom de Vries writes: >>> On 27-04-14 12:27, Richard Sandiford wrote: Tom de Vries writes: >mips_emit_call_insn (rtx pattern, rtx orig_addr, rtx addr, bool lazy_p) >{ > rtx insn, reg; > > -

Re: -fuse-caller-save - Enable for MIPS

2014-04-28 Thread Tom de Vries
On 28-04-14 12:47, Tom de Vries wrote: Hmm, is that just because -fcaller-saves is -O2 and above? For -O1, after adding -fcaller-saves the optimization triggers, and the test-cases passes. For -O0, adding -fcaller-saves doesn't make a difference, the optimization doesn't trigger. If so,

Re: -fuse-caller-save - Enable for MIPS

2014-04-28 Thread Tom de Vries
On 28-04-14 12:26, Richard Sandiford wrote: Tom de Vries writes: On 27-04-14 12:27, Richard Sandiford wrote: Tom de Vries 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 (patter

Re: -fuse-caller-save - Enable for MIPS

2014-04-28 Thread Richard Sandiford
Tom de Vries writes: > On 27-04-14 12:27, Richard Sandiford wrote: >> Tom de Vries 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_c

Re: -fuse-caller-save - Enable for MIPS

2014-04-27 Thread Tom de Vries
On 27-04-14 12:27, Richard Sandiford wrote: Tom de Vries writes: 2014-01-12 Radovan Obradovic Tom de Vries * config/mips/mips-protos.h (mips_emit_call_insn): Declare. * config/mips/mips.h (POST_CALL_TMP_REG): Define. * config/mips/mips.c (mips_emit_cal

Re: -fuse-caller-save - Enable for MIPS

2014-04-27 Thread Richard Sandiford
Tom de Vries writes: > 2014-01-12 Radovan Obradovic > Tom de Vries > > * config/mips/mips-protos.h (mips_emit_call_insn): Declare. > * config/mips/mips.h (POST_CALL_TMP_REG): Define. > * config/mips/mips.c (mips_emit_call_insn): Remove static. Use > last_c

Re: -fuse-caller-save - Enable for MIPS

2014-04-26 Thread Tom de Vries
On 25-04-14 15:22, Richard Sandiford wrote: Tom de Vries writes: diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 45256e9..b61cd44 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -7027,11 +7027,17 @@ mips_expand_call (enum mips_call_type type, rtx result,

Re: -fuse-caller-save - Enable for MIPS

2014-04-25 Thread Richard Sandiford
Tom de Vries writes: > diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c > index 45256e9..b61cd44 100644 > --- a/gcc/config/mips/mips.c > +++ b/gcc/config/mips/mips.c > @@ -7027,11 +7027,17 @@ mips_expand_call (enum mips_call_type type, rtx > result, rtx addr, > { >rtx orig_addr,

-fuse-caller-save - Enable for MIPS

2014-04-25 Thread Tom de Vries
On 22-04-14 17:05, Tom de Vries wrote: I've updated the fuse-caller-save patch series to model non-callee call clobbers in CALL_INSN_FUNCTION_USAGE. Richard, this patch enables the fuse-caller-save optimization for MIPS. It adds the $6 clobber in CALL_INSN_FUNCTION_USAGE when required, and s