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

Pat Haugen pthaugen@linux.vnet.ibm.com
Fri Oct 7 15:08:00 GMT 2016

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 that by computing call_saved regs per class and subtracting out some scaled portion of that.

Bootstrap/regtest on powerpc64le with no new failures. Ok for trunk?


2016-10-07  Pat Haugen  <pthaugen@us.ibm.com>

	* haifa-sched.c call_used_regs_num: Rename to...
	call_saved_regs_num: ...this.
	(sched_pressure_start_bb): Scale call_saved regs not call_used.
	(alloc_global_sched_pressure_data): Compute call_saved regs.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: sched-pressure-reg-limit.diff
Type: text/x-patch
Size: 2812 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20161007/ca4f0d77/attachment.bin>

More information about the Gcc-patches mailing list