Jeff Law <l...@redhat.com> writes: > On 10/23/2017 11:09 AM, Richard Sandiford wrote: >> Normmaly the IRA-reload interface tries to track the liveness of >> individual bytes of an allocno if the allocno is sometimes written >> to as a SUBREG. This isn't possible for variable-sized allocnos, >> but it doesn't matter because targets with variable-sized registers >> should use LRA instead. >> >> This patch adds a get_subreg_tracking_sizes function for deciding >> whether it is possible to model a partial read or write. Later >> patches make it return false if anything is variable. >> >> >> 2017-10-23 Richard Sandiford <richard.sandif...@linaro.org> >> Alan Hayward <alan.hayw...@arm.com> >> David Sherwood <david.sherw...@arm.com> >> >> gcc/ >> * ira.c (get_subreg_tracking_sizes): New function. >> (init_live_subregs): Take an integer size rather than a register. >> (build_insn_chain): Use get_subreg_tracking_sizes. Update calls >> to init_live_subregs. > OK. > > Note this is starting to get close to the discussion around CLOBBER_HIGH > vs using a self set with a low subreg that we're having with Alan on > another thread in that liveness tracking of subregs of SVE regs could > potentially use some improvements. > > When I quickly looked at the subreg handling in the df infrstructure my > first thought was that it might need some updating for SVE. I can't > immediately call bits for poly_int/SVE in the patches to-date. Have you > dug in there at all for the poly_int/SVE work?
Yeah, although the subreg tracking in this patch is specific to reload, I thought we had something similar for LRA. I couldn't find anything though, and the static type checking of poly_ints would have forced the issue. There is the DF_WORD_LR code, which tracks the liveness of words in a double-word pseudo. We didn't extend that to variable-length registers for two reasons: (1) if we did need it, we'd want it for pseudos that map to 3 or 4 registers, not just 2, so that LD[234] and ST[234] are handled consistently; and (2) it's only used for DCE at the moment, and it's rare for LD[234]/ST[234]s to be dead code. Thanks, Richard