Re: [PATCH] Account for prologue spills in reg_pressure scheduling

2014-10-23 Thread Maxim Kuvyrkov
On Oct 23, 2014, at 8:20 PM, Richard Sandiford wrote: > Maxim Kuvyrkov writes: >> @@ -6701,6 +6753,24 @@ alloc_global_sched_pressure_data (void) >>saved_reg_live = BITMAP_ALLOC (NULL); >>region_ref_regs = BITMAP_ALLOC (NULL); >> } >> + >> + /* Calculate number of CALL_

Re: [PATCH] Account for prologue spills in reg_pressure scheduling

2014-10-23 Thread Richard Sandiford
Maxim Kuvyrkov writes: > @@ -6701,6 +6753,24 @@ alloc_global_sched_pressure_data (void) > saved_reg_live = BITMAP_ALLOC (NULL); > region_ref_regs = BITMAP_ALLOC (NULL); > } > + > + /* Calculate number of CALL_USED_REGS in register classes that > + we calculate regis

Re: [PATCH] Account for prologue spills in reg_pressure scheduling

2014-10-22 Thread Maxim Kuvyrkov
On Oct 23, 2014, at 3:45 AM, Vladimir Makarov wrote: ... > Richard proposed 2-loops solution instead of 3. So I'd definitely prefer his. > > The patch is ok with Richard's 2-loops proposal. Thanks, Maxim. As I wrote > the heuristic is an interesting one. This is the patch I'm going to commi

Re: [PATCH] Account for prologue spills in reg_pressure scheduling

2014-10-22 Thread Vladimir Makarov
On 2014-10-22 2:17 AM, Maxim Kuvyrkov wrote: On Oct 22, 2014, at 4:24 AM, Vladimir Makarov wrote: On 10/20/2014 02:57 AM, Maxim Kuvyrkov wrote: Hi, This patch improves register pressure scheduling (both SCHED_PRESSURE_WEIGHTED and SCHED_PRESSURE_MODEL) to better estimate number of available

Re: [PATCH] Account for prologue spills in reg_pressure scheduling

2014-10-22 Thread Richard Sandiford
Maxim Kuvyrkov writes: > + for (i = 0; i < FIRST_PSEUDO_REGISTER; ++i) > + if (call_used_regs[i]) > + for (c = 0; c < ira_pressure_classes_num; ++c) > + { > + int j; > + enum reg_class cl = ira_pressure_classes[c]; > + > + for (j = 0; j < ira_cl

Re: [PATCH] Account for prologue spills in reg_pressure scheduling

2014-10-21 Thread Maxim Kuvyrkov
On Oct 22, 2014, at 4:24 AM, Vladimir Makarov wrote: > On 10/20/2014 02:57 AM, Maxim Kuvyrkov wrote: >> Hi, >> >> This patch improves register pressure scheduling (both >> SCHED_PRESSURE_WEIGHTED and SCHED_PRESSURE_MODEL) to better estimate number >> of available registers. >> >> At the momen

Re: [PATCH] Account for prologue spills in reg_pressure scheduling

2014-10-21 Thread Vladimir Makarov
On 10/20/2014 02:57 AM, Maxim Kuvyrkov wrote: > Hi, > > This patch improves register pressure scheduling (both > SCHED_PRESSURE_WEIGHTED and SCHED_PRESSURE_MODEL) to better estimate number > of available registers. > > At the moment the scheduler does not account for spills in the prologues and

Re: [PATCH] Account for prologue spills in reg_pressure scheduling

2014-10-20 Thread Sebastian Pop
Ramana Radhakrishnan wrote: > We already have sched-pressure --param=sched-pressure-algorithm=1 on > by default in the AArch64 backend from September. > https://gcc.gnu.org/ml/gcc-patches/2014-09/msg01663.html went in a few > days back. > > So if this patch is on then we are looking at uplifts wi

Re: [PATCH] Account for prologue spills in reg_pressure scheduling

2014-10-20 Thread Maxim Kuvyrkov
On Oct 21, 2014, at 10:39 AM, Ramana Radhakrishnan wrote: > On Mon, Oct 20, 2014 at 10:17 PM, Richard Sandiford > wrote: >> Maxim Kuvyrkov writes: >>> [Adding ARM maintainers to CC] >>> >>> On Oct 21, 2014, at 9:44 AM, Sebastian Pop wrote: >>> Hi Maxim, Maxim Kuvyrkov wrote:

RE: [PATCH] Account for prologue spills in reg_pressure scheduling

2014-10-20 Thread Evandro Menezes
> [Adding ARM maintainers to CC] > > On Oct 21, 2014, at 9:44 AM, Sebastian Pop wrote: > > > Hi Maxim, > > > > Maxim Kuvyrkov wrote: > >> Thanks, benchmarking results are welcome! AArch64 doesn't use > >> reg_pressure scheduling by default. Use "-fsched-pressure > >> --param=sched-pressure-alg

Re: [PATCH] Account for prologue spills in reg_pressure scheduling

2014-10-20 Thread Ramana Radhakrishnan
On Mon, Oct 20, 2014 at 10:17 PM, Richard Sandiford wrote: > Maxim Kuvyrkov writes: >> [Adding ARM maintainers to CC] >> >> On Oct 21, 2014, at 9:44 AM, Sebastian Pop wrote: >> >>> Hi Maxim, >>> >>> Maxim Kuvyrkov wrote: Thanks, benchmarking results are welcome! AArch64 doesn't use reg_pre

Re: [PATCH] Account for prologue spills in reg_pressure scheduling

2014-10-20 Thread Sebastian Pop
Maxim Kuvyrkov wrote: > [Adding ARM maintainers to CC] > > On Oct 21, 2014, at 9:44 AM, Sebastian Pop wrote: > > > Hi Maxim, > > > > Maxim Kuvyrkov wrote: > >> Thanks, benchmarking results are welcome! AArch64 doesn't use reg_pressure > >> scheduling by default. Use "-fsched-pressure > >> --p

Re: [PATCH] Account for prologue spills in reg_pressure scheduling

2014-10-20 Thread Richard Sandiford
Maxim Kuvyrkov writes: > [Adding ARM maintainers to CC] > > On Oct 21, 2014, at 9:44 AM, Sebastian Pop wrote: > >> Hi Maxim, >> >> Maxim Kuvyrkov wrote: >>> Thanks, benchmarking results are welcome! AArch64 doesn't use reg_pressure >>> scheduling by default. Use "-fsched-pressure >>> --param=s

Re: [PATCH] Account for prologue spills in reg_pressure scheduling

2014-10-20 Thread Maxim Kuvyrkov
[Adding ARM maintainers to CC] On Oct 21, 2014, at 9:44 AM, Sebastian Pop wrote: > Hi Maxim, > > Maxim Kuvyrkov wrote: >> Thanks, benchmarking results are welcome! AArch64 doesn't use reg_pressure >> scheduling by default. Use "-fsched-pressure >> --param=sched-pressure-algorithm=2" to enable

Re: [PATCH] Account for prologue spills in reg_pressure scheduling

2014-10-20 Thread Sebastian Pop
Hi Maxim, Maxim Kuvyrkov wrote: > Thanks, benchmarking results are welcome! AArch64 doesn't use reg_pressure > scheduling by default. Use "-fsched-pressure > --param=sched-pressure-algorithm=2" to enable same thing as on ARM. I would > imagine C++ and Fortran floating-point code to be most aff

Re: [PATCH] Account for prologue spills in reg_pressure scheduling

2014-10-20 Thread Maxim Kuvyrkov
On Oct 21, 2014, at 8:11 AM, Sebastian Pop wrote: > Maxim Kuvyrkov wrote: >> Hi, >> >> This patch improves register pressure scheduling (both >> SCHED_PRESSURE_WEIGHTED and SCHED_PRESSURE_MODEL) to better estimate number >> of available registers. >> >> At the moment the scheduler does not ac

Re: [PATCH] Account for prologue spills in reg_pressure scheduling

2014-10-20 Thread Sebastian Pop
Maxim Kuvyrkov wrote: > Hi, > > This patch improves register pressure scheduling (both > SCHED_PRESSURE_WEIGHTED and SCHED_PRESSURE_MODEL) to better estimate number > of available registers. > > At the moment the scheduler does not account for spills in the prologues and > restores in the epil

[PATCH] Account for prologue spills in reg_pressure scheduling

2014-10-19 Thread Maxim Kuvyrkov
Hi, This patch improves register pressure scheduling (both SCHED_PRESSURE_WEIGHTED and SCHED_PRESSURE_MODEL) to better estimate number of available registers. At the moment the scheduler does not account for spills in the prologues and restores in the epilogue, which occur from use of call-used