[PATCH] register CALL_INSN_FUNCTION_USAGE in find_all_hard_reg_sets

2014-01-15 Thread Tom de Vries
Eric, This patch adds scanning of clobbers in CALL_INSN_FUNCTION_USAGE to find_all_hard_reg_sets. For MIPS, calls are split at some point. After the split, one of the resulting insns may clobber $6. But before the split, that's not explicit in the rtl representation of the unsplit call. Fo

Re: [PATCH] register CALL_INSN_FUNCTION_USAGE in find_all_hard_reg_sets

2014-04-16 Thread Tom de Vries
On 16-01-14 09:13, Richard Sandiford wrote: Tom de Vries writes: * The set of registers which are clobbered during a call by things like the plt - these are not picked up by the use-caller-save optimization. We need the hook to inform the compiler about these registers Right, but...

[PING] [PATCH] register CALL_INSN_FUNCTION_USAGE in find_all_hard_reg_sets

2014-04-16 Thread Tom de Vries
On 15-01-14 17:53, Tom de Vries wrote: Eric, This patch adds scanning of clobbers in CALL_INSN_FUNCTION_USAGE to find_all_hard_reg_sets. For MIPS, calls are split at some point. After the split, one of the resulting insns may clobber $6. But before the split, that's not explicit in the rtl repr

Re: [PATCH] register CALL_INSN_FUNCTION_USAGE in find_all_hard_reg_sets

2014-04-16 Thread Richard Sandiford
Tom de Vries writes: > On 16-01-14 09:13, Richard Sandiford wrote: >> Tom de Vries writes: >>> * The set of registers which are clobbered during a call by things >>> like the plt >>> - these are not picked up by the use-caller-save optimization. We >>> need the >>> hook to inform the comp

Re: [PATCH] register CALL_INSN_FUNCTION_USAGE in find_all_hard_reg_sets

2014-04-16 Thread Tom de Vries
On 16/04/14 12:28, Richard Sandiford wrote: >> > This patch introduces a hook that specifies which registers are implicitly >> > clobbered by a call, not including the registers that are clobbered in the >> > called function, and then uses that hook to add those registers to >> > CALL_INSN_FUNCT

Re: [PATCH] register CALL_INSN_FUNCTION_USAGE in find_all_hard_reg_sets

2014-04-16 Thread Jakub Jelinek
On Wed, Apr 16, 2014 at 11:46:14AM +0200, Tom de Vries wrote: > >...why do we need two different mechanisms to deal with these two? > >IMO the set recorded for the callee should contain what the callee > >instructions clobber and nothing else. CALL_INSN_FUNCTION_USAGE > >should contain everything

Re: [PATCH] register CALL_INSN_FUNCTION_USAGE in find_all_hard_reg_sets

2014-04-16 Thread Richard Sandiford
Jakub Jelinek writes: > On Wed, Apr 16, 2014 at 11:46:14AM +0200, Tom de Vries wrote: >> >...why do we need two different mechanisms to deal with these two? >> >IMO the set recorded for the callee should contain what the callee >> >instructions clobber and nothing else. CALL_INSN_FUNCTION_USAGE >

Re: [PATCH] register CALL_INSN_FUNCTION_USAGE in find_all_hard_reg_sets

2014-04-16 Thread Richard Sandiford
Tom de Vries writes: > On 16/04/14 12:28, Richard Sandiford wrote: >>> > This patch introduces a hook that specifies which registers are >>> > implicitly >>> > clobbered by a call, not including the registers that are clobbered in >>> > the >>> > called function, and then uses that hook to add

Re: [PATCH] register CALL_INSN_FUNCTION_USAGE in find_all_hard_reg_sets

2014-01-15 Thread Richard Sandiford
Tom de Vries writes: > This patch adds scanning of clobbers in CALL_INSN_FUNCTION_USAGE to > find_all_hard_reg_sets. > > For MIPS, calls are split at some point. After the split, one of the > resulting insns may clobber $6. But before the split, that's not > explicit in the rtl representation of

Re: [PATCH] register CALL_INSN_FUNCTION_USAGE in find_all_hard_reg_sets

2014-01-15 Thread Tom de Vries
On 15-01-14 19:40, Richard Sandiford wrote: Tom de Vries writes: This patch adds scanning of clobbers in CALL_INSN_FUNCTION_USAGE to find_all_hard_reg_sets. For MIPS, calls are split at some point. After the split, one of the resulting insns may clobber $6. But before the split, that's not exp

Re: [PATCH] register CALL_INSN_FUNCTION_USAGE in find_all_hard_reg_sets

2014-01-16 Thread Richard Sandiford
Tom de Vries writes: > * The set of registers which are clobbered during a call by things like the > plt >- these are not picked up by the use-caller-save optimization. We need the >hook to inform the compiler about these registers Right, but... > * And finally, registers clobbered in t

Re: [PING] [PATCH] register CALL_INSN_FUNCTION_USAGE in find_all_hard_reg_sets

2014-04-22 Thread Eric Botcazou
> Ping of this ( http://gcc.gnu.org/ml/gcc-patches/2014-01/msg00888.html ) > patch. That patch isn't for GCC mainline though, but OK on principle if you test it on mainline, avoid the very ugly set-inside-use idiom and do: record_hard_reg_sets (XEXP (op, 0), NULL, pset); instead of reimplemen

Re: [PING] [PATCH] register CALL_INSN_FUNCTION_USAGE in find_all_hard_reg_sets

2014-04-22 Thread Tom de Vries
On 22-04-14 21:27, Eric Botcazou wrote: Ping of this ( http://gcc.gnu.org/ml/gcc-patches/2014-01/msg00888.html ) patch. Eric, thanks for the review. That patch isn't for GCC mainline though, but I don't understand why you say that. OK on principle if you test it on mainline, I have.

Re: [PING] [PATCH] register CALL_INSN_FUNCTION_USAGE in find_all_hard_reg_sets

2014-04-22 Thread Eric Botcazou
> I don't understand why you say that. Because it cannot be applied on GCC mainline. -- Eric Botcazou

Re: [PING] [PATCH] register CALL_INSN_FUNCTION_USAGE in find_all_hard_reg_sets

2014-04-23 Thread Tom de Vries
On 23-04-14 00:03, Eric Botcazou wrote: I don't understand why you say that. Because it cannot be applied on GCC mainline. Eric, Ah, I see. Indeed, the patch is dependent on approved patch 'Add implicit parameter to find_all_hard_reg_sets' ( http://gcc.gnu.org/ml/gcc-patches/2013-03/msg01