This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: pr52543


i actually care about all registers, not just the hard ones. as it turns out i had been wrong and lower-subregs splits pseudo to pseudo moves, and hard reg to and from psuedo moves.

register_move_cost requires the regclasses.

anyway that is not the right thing to do for the shifts.

kenny

On 03/20/2012 09:40 AM, Ian Lance Taylor wrote:
Kenneth Zadeck<zadeck@naturalbridge.com> writes:

I think that the question is really bigger than finding the correct
line to fix.   The problem is, that this code assumes that machines do
not have multiword moves or multiword shifts.   My machine has both,
and i assume that the avr and the neon have at least multiword moves
(but i do not know about the shifts).   And as life moves forward,
more machines will have these.

It seems like the right way to fix this is to somehow enhance the code
at the beginning of decompose_multiword_subregs to ask which modes are
not cheap to move or shift and then modify the second loop to never
lower for those operations for those modes.

The question is do i add 2 more target hooks (one for shifting and one
for moves) or do i use the rtx_cost mechanism and split for anything
over COSTS_N_INSNS (1) or some such?
Why not use REGISTER_MOVE_COST?  You only care about hard registers, and
all that matters are moves between hard registers and pseudo-regs.  So
if you find a hard register REG, and if

   register_move_cost (GET_MODE (reg), REGNO_REG_CLASS (REGNO (REG)),
                       REGNO_REG_CLASS (REGNO (REG)))
     == 2

then put the pseudo reg into non_decomposable_context.  This would be in
find_decomposable_subregs.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]