Re: Add an "early rematerialisation" pass

2018-01-09 Thread Jeff Law
On 01/09/2018 08:34 AM, Richard Sandiford wrote: > Possible ping: wasn't sure whether this one needed more work or whether > it was OK to go in. I've attached the patch with the improved comment > above early_remat::emit_copy_before. > You answered all the questions I had. I should have explicit

Re: Add an "early rematerialisation" pass

2018-01-09 Thread Richard Sandiford
Possible ping: wasn't sure whether this one needed more work or whether it was OK to go in. I've attached the patch with the improved comment above early_remat::emit_copy_before. Thanks, Richard Richard Sandiford writes: > Jeff Law writes: >> On 11/17/2017 08:58 AM, Richard Sandiford wrote: >>

Re: Add an "early rematerialisation" pass

2017-12-15 Thread Richard Sandiford
Jeff Law writes: > On 11/17/2017 08:58 AM, Richard Sandiford wrote: >> This patch looks for pseudo registers that are live across a call >> and for which no call-preserved hard registers exist. It then >> recomputes the pseudos as necessary to ensure that they are no >> longer live across a call.

Re: Add an "early rematerialisation" pass

2017-12-15 Thread Richard Sandiford
Jeff Law writes: > On 12/14/2017 12:26 PM, Richard Sandiford wrote: How does it relate to what LRA can do? AFAIK LRA doesn't try to find any global optimal solution and previous hardreg assignments may work against it? >> >> Yeah, both of those are problems. But the more importan

Re: Add an "early rematerialisation" pass

2017-12-15 Thread Jeff Law
On 11/17/2017 08:58 AM, Richard Sandiford wrote: > This patch looks for pseudo registers that are live across a call > and for which no call-preserved hard registers exist. It then > recomputes the pseudos as necessary to ensure that they are no > longer live across a call. The comment at the hea

Re: Add an "early rematerialisation" pass

2017-12-15 Thread Jeff Law
On 12/14/2017 12:26 PM, Richard Sandiford wrote: >>> How does it relate to what LRA can do? AFAIK LRA doesn't try to find >>> any global optimal solution and previous hardreg assignments may work >>> against it? > > Yeah, both of those are problems. But the more important problem is > that it c

Re: Add an "early rematerialisation" pass

2017-12-15 Thread Jakub Jelinek
On Fri, Dec 15, 2017 at 08:14:38PM +0100, Richard Biener wrote: > On December 15, 2017 8:10:33 PM GMT+01:00, Jeff Law wrote: > >On 12/14/2017 12:32 PM, Richard Biener wrote: > >> > >> On x86_64 all xmm registers are caller saved for example. That means > >all FP regs and all vectors. (yeah, stupi

Re: Add an "early rematerialisation" pass

2017-12-15 Thread Richard Biener
On December 15, 2017 8:10:33 PM GMT+01:00, Jeff Law wrote: >On 12/14/2017 12:32 PM, Richard Biener wrote: >> >> On x86_64 all xmm registers are caller saved for example. That means >all FP regs and all vectors. (yeah, stupid ABI decision) >But that's precisely what I would expect if one was l

Re: Add an "early rematerialisation" pass

2017-12-15 Thread Jeff Law
On 12/14/2017 12:32 PM, Richard Biener wrote: > > On x86_64 all xmm registers are caller saved for example. That means all FP > regs and all vectors. (yeah, stupid ABI decision) But that's precisely what I would expect if one was looking to maintain backwards compatibility within the core run

Re: Add an "early rematerialisation" pass

2017-12-14 Thread Richard Sandiford
Richard Biener writes: > On December 14, 2017 8:26:49 PM GMT+01:00, Richard Sandiford > wrote: >>Jeff Law writes: >>> On 12/14/2017 04:09 AM, Richard Biener wrote: On Fri, Nov 17, 2017 at 4:58 PM, Richard Sandiford wrote: > This patch looks for pseudo registers that are live acros

Re: Add an "early rematerialisation" pass

2017-12-14 Thread Richard Biener
On December 14, 2017 8:26:49 PM GMT+01:00, Richard Sandiford wrote: >Jeff Law writes: >> On 12/14/2017 04:09 AM, Richard Biener wrote: >>> On Fri, Nov 17, 2017 at 4:58 PM, Richard Sandiford >>> wrote: This patch looks for pseudo registers that are live across a call and for which no c

Re: Add an "early rematerialisation" pass

2017-12-14 Thread Richard Sandiford
Jeff Law writes: > On 12/14/2017 04:09 AM, Richard Biener wrote: >> On Fri, Nov 17, 2017 at 4:58 PM, Richard Sandiford >> wrote: >>> This patch looks for pseudo registers that are live across a call >>> and for which no call-preserved hard registers exist. It then >>> recomputes the pseudos as n

Re: Add an "early rematerialisation" pass

2017-12-14 Thread Jeff Law
On 12/14/2017 04:09 AM, Richard Biener wrote: > On Fri, Nov 17, 2017 at 4:58 PM, Richard Sandiford > wrote: >> This patch looks for pseudo registers that are live across a call >> and for which no call-preserved hard registers exist. It then >> recomputes the pseudos as necessary to ensure that t

Re: Add an "early rematerialisation" pass

2017-12-14 Thread Richard Biener
On Fri, Nov 17, 2017 at 4:58 PM, Richard Sandiford wrote: > This patch looks for pseudo registers that are live across a call > and for which no call-preserved hard registers exist. It then > recomputes the pseudos as necessary to ensure that they are no > longer live across a call. The comment

Add an "early rematerialisation" pass

2017-11-17 Thread Richard Sandiford
This patch looks for pseudo registers that are live across a call and for which no call-preserved hard registers exist. It then recomputes the pseudos as necessary to ensure that they are no longer live across a call. The comment at the head of the file describes the approach. A new target hook