Re: [PATCH][PR debug/83758] look more carefully for internal_arg_pointer in vt_add_function_parameter()

2018-01-30 Thread Jakub Jelinek
On Tue, Jan 30, 2018 at 06:50:50AM -0600, Aaron Sawdey wrote: > > Anyway, my preference would be to change that gen_rtx_PLUS into > > stack_parm = crtl->args.internal_arg_pointer; > > if (!CONST_INT_P (offset_rtx)) > > stack_parm = gen_rtx_PLUS (Pmode, stack_parm, offset_rtx); > > else

Re: [PATCH][PR debug/83758] look more carefully for internal_arg_pointer in vt_add_function_parameter()

2018-01-30 Thread Aaron Sawdey
On Tue, 2018-01-30 at 11:13 +0100, Jakub Jelinek wrote: > On Tue, Jan 30, 2018 at 03:55:58AM -0600, Segher Boessenkool wrote: > > > But in that case, what does the copying? > > > > I don't know. Aaron will look at it, but timezones etc. :-) Indeed I did see unshare_all_rtl() copying

Re: [PATCH][PR debug/83758] look more carefully for internal_arg_pointer in vt_add_function_parameter()

2018-01-30 Thread Jakub Jelinek
On Tue, Jan 30, 2018 at 03:55:58AM -0600, Segher Boessenkool wrote: > > But in that case, what does the copying? > > I don't know. Aaron will look at it, but timezones etc. :-) > > > That's what seems strange. I can see why we'd have two nested > > pluses with the inner plus being

Re: [PATCH][PR debug/83758] look more carefully for internal_arg_pointer in vt_add_function_parameter()

2018-01-30 Thread Richard Sandiford
Segher Boessenkool writes: > On Tue, Jan 30, 2018 at 09:41:47AM +, Richard Sandiford wrote: >> Segher Boessenkool writes: >> > On Mon, Jan 29, 2018 at 11:41:32PM +0100, Jakub Jelinek wrote: >> >> On Mon, Jan 29, 2018 at 04:26:50PM

Re: [PATCH][PR debug/83758] look more carefully for internal_arg_pointer in vt_add_function_parameter()

2018-01-30 Thread Segher Boessenkool
On Tue, Jan 30, 2018 at 09:41:47AM +, Richard Sandiford wrote: > Segher Boessenkool writes: > > On Mon, Jan 29, 2018 at 11:41:32PM +0100, Jakub Jelinek wrote: > >> On Mon, Jan 29, 2018 at 04:26:50PM -0600, Segher Boessenkool wrote: > >> > > The code actually meant

Re: [PATCH][PR debug/83758] look more carefully for internal_arg_pointer in vt_add_function_parameter()

2018-01-30 Thread Richard Sandiford
Segher Boessenkool writes: > On Mon, Jan 29, 2018 at 11:41:32PM +0100, Jakub Jelinek wrote: >> On Mon, Jan 29, 2018 at 04:26:50PM -0600, Segher Boessenkool wrote: >> > > The code actually meant pointer comparison, the question is what is >> > > different on powerpc*

Re: [PATCH][PR debug/83758] look more carefully for internal_arg_pointer in vt_add_function_parameter()

2018-01-29 Thread Segher Boessenkool
On Mon, Jan 29, 2018 at 11:41:32PM +0100, Jakub Jelinek wrote: > On Mon, Jan 29, 2018 at 04:26:50PM -0600, Segher Boessenkool wrote: > > > The code actually meant pointer comparison, the question is what is > > > different on powerpc* that you end up with a different REG. > > > >From what I can

Re: [PATCH][PR debug/83758] look more carefully for internal_arg_pointer in vt_add_function_parameter()

2018-01-29 Thread Jakub Jelinek
On Mon, Jan 29, 2018 at 04:26:50PM -0600, Segher Boessenkool wrote: > > The code actually meant pointer comparison, the question is what is > > different on powerpc* that you end up with a different REG. > > >From what I can see, function.c uses crtl->args.internal_arg_pointer > > directly rather

Re: [PATCH][PR debug/83758] look more carefully for internal_arg_pointer in vt_add_function_parameter()

2018-01-29 Thread Segher Boessenkool
On Mon, Jan 29, 2018 at 11:05:29PM +0100, Jakub Jelinek wrote: > On Mon, Jan 29, 2018 at 03:01:10PM -0600, Aaron Sawdey wrote: > > /* If there is a DRAP register or a pseudo in internal_arg_pointer, > > rewrite the incoming location of parameters passed on the stack > > into MEMs based

Re: [PATCH][PR debug/83758] look more carefully for internal_arg_pointer in vt_add_function_parameter()

2018-01-29 Thread Jakub Jelinek
On Mon, Jan 29, 2018 at 03:01:10PM -0600, Aaron Sawdey wrote: > /* If there is a DRAP register or a pseudo in internal_arg_pointer, > rewrite the incoming location of parameters passed on the stack > into MEMs based on the argument pointer, so that incoming doesn't > depend on a

[PATCH][PR debug/83758] look more carefully for internal_arg_pointer in vt_add_function_parameter()

2018-01-29 Thread Aaron Sawdey
This bug appears to revolve around whether there is a canonical rtx for internal_arg_pointer in var-tracking. In vt_add_function_parameter() we currently have: static void vt_add_function_parameter (tree parm) { rtx decl_rtl = DECL_RTL_IF_SET (parm); rtx incoming = DECL_INCOMING_RTL (parm);