[PATCH, v2] Fix computation of register limit for -fsched-pressure

Jeff Law law@redhat.com
Mon Oct 24 19:03:00 GMT 2016


On 10/18/2016 01:47 PM, Pat Haugen wrote:
> The patch here, https://gcc.gnu.org/ml/gcc-patches/2014-10/msg01872.html, attempted to scale down the register limit used by -fsched-pressure for the case where the block in question executes as frequently as the entry block to just the call_clobbered (i.e. call_used) regs. But the code is actually scaling toward call_saved registers. The following patch corrects the following two issues:
>
> 1) Computes and then removes the FIXED_REGS for the pressure class.
> 2) Computes CALL_SAVED regs per class and subtracts out some scaled portion of that.
>
> Bootstrap/regtest on powerpc64le in progress. Ok for trunk if no new failures?
>
> -Pat
>
>
> 2016-10-18  Pat Haugen  <pthaugen@us.ibm.com>
>
>         * haifa-sched.c (call_used_regs_num): Rename to...
>         (call_saved_regs_num): ...this.
>         (fixed_regs_num): New variable.
>         (sched_pressure_start_bb): Subtract out fixed_regs. Scale call_saved
>         regs not call_used.
>         (alloc_global_sched_pressure_data): Compute call_saved and fixed regs.
>
>
OK.
jeff



More information about the Gcc-patches mailing list