r242863 - in /trunk/gcc: ChangeLog function.c f...
rsandifo@gcc.gnu.org
rsandifo@gcc.gnu.org
Fri Nov 25 08:23:00 GMT 2016
Author: rsandifo
Date: Fri Nov 25 08:23:08 2016
New Revision: 242863
URL: https://gcc.gnu.org/viewcvs?rev=242863&root=gcc&view=rev
Log:
Tweak LRA handling of shared spill slots
The previous code processed the users of a stack slot in order of
decreasing size and allocated the slot based on the first user.
This seems a bit dangerous, since the ordering is based on the
mode of the biggest reference while the allocation is based also
on the size of the register itself (which I think could be larger).
That scheme doesn't scale well to polynomial sizes, since there's
no guarantee that the order of the sizes is known at compile time.
This patch instead records an upper bound on the size required
by all users of a slot. It also records the maximum alignment
requirement.
gcc/
2016-11-15 Richard Sandiford <richard.sandiford@arm.com>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* function.h (spill_slot_alignment): Declare.
* function.c (spill_slot_alignment): New function.
* lra-spills.c (slot): Add align and size fields.
(assign_mem_slot): Use them in the call to assign_stack_local.
(add_pseudo_to_slot): Update the fields.
(assign_stack_slot_num_and_sort_pseudos): Initialise the fields.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/function.c
trunk/gcc/function.h
trunk/gcc/lra-spills.c
More information about the Gcc-cvs
mailing list