This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Improve spillcost of literal pool loads
- From: Jeff Law <law at redhat dot com>
- To: Wilco Dijkstra <wdijkstr at arm dot com>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 29 Oct 2014 14:49:11 -0600
- Subject: Re: [PATCH] Improve spillcost of literal pool loads
- Authentication-results: sourceware.org; auth=none
- References: <002201cff37b$5145f560$f3d1e020$ at com>
On 10/29/14 07:21, Wilco Dijkstra wrote:
Do you have a testcase that shows the expected improvements from this
change? It's OK if it's specific to a target.
This patch adjusts the spill cost of literal pool loads to reduce the chance of them being
caller-saved (which is inefficient). Such loads should be rematerialized and thus should not include
the cost of a spill store. This was done only on constants for which legitimate_constant_p is true,
however it is right thing to do for any constant, including constants in literal pools (which are
typically not legitimate). Also use ALL_REGS rather than GENERAL_REGS as ALL_REGS has the correct
floating point register costs.
2014-10-29 Wilco Dijkstra <email@example.com>
* gcc/ira-costs.c (scan_one_insn): Improve spill cost adjustment.
Have you bootstrapped and regression tested this change?
With a test for the testsuite and assuming it passes bootstrap and
regression testing, this will almost certainly be OK.