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]

Re: PowerPC regclass problem


>>>>> Jeffrey A Law writes:

Jeff> I would think that in addition to the constraints that the definition of the
Jeff> BASE_REG_CLASS would also tend to keep base register values out of r0.

Jeff> regclass is supposed to look at memory refs and figure out which register is
Jeff> the base & index, then adjust the costs accordingly.

	BASE_REG_CLASS is defined as BASE_REGS, but that obviously was not
enough.

Jeff> What happens if you change the operand to something like:
Jeff> (use (match_operand "memory_operand" "o")

Jeff> With the appropriate changes elsewhere in the rs6000 machine description?

	Making the appropriate changes, regclass correctly selects
BASE_REGS as the class instead of GENERAL_REGS.

	I modified the rs6000-specific offsettable_addr_operand()
predicate so that it now is offsettable_mem_operand().  Both the old and
new predicates rely upon recog.c:offsettable_address_p().  Should I
continue with this narrower predicate instead of simply memory_operand()?
I am not sure of the implications and why Michael created the
offsettable_addr_operand() instead of simply using address_operand(), but
I do not want to widen the predicate if there was a reason.

	Also, I still think that regclass.c is broken with respect to 'p'
constraint.  I think that it has to set "win", either unilaterally or
testing address_operand() again.

Thanks, David


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