arm: Add GENERAL_AND_VPR_REGS regclass
authorChristophe Lyon <christophe.lyon@arm.com>
Wed, 13 Oct 2021 09:16:09 +0000 (09:16 +0000)
committerChristophe Lyon <christophe.lyon@foss.st.com>
Tue, 22 Feb 2022 15:55:06 +0000 (15:55 +0000)
commitbf3e36fbf13f0db44a79988036cb9c042288841a
tree987b7c7f90f1095b5506b29beeafa296cc5250d4
parent7b1cce9273ce49fee5f5ebafb22107b97e3e7741
arm: Add GENERAL_AND_VPR_REGS regclass

At some point during the development of this patch series, it appeared
that in some cases the register allocator wants “VPR or general”
rather than “VPR or general or FP” (which is the same thing as
ALL_REGS).  The series does not seem to require this anymore, but it
seems to be a good thing to do anyway, to give the register allocator
more freedom.

CLASS_MAX_NREGS and arm_hard_regno_nregs need adjustment to avoid a
regression in gcc.dg/stack-usage-1.c when compiled with -mthumb
-mfloat-abi=hard -march=armv8.1-m.main+mve.fp+fp.dp.

Most of the work of this patch series was carried out while I was
working at STMicroelectronics as a Linaro assignee.

2022-02-22  Christophe Lyon  <christophe.lyon@arm.com>

gcc/
* config/arm/arm.h (reg_class): Add GENERAL_AND_VPR_REGS.
(REG_CLASS_NAMES): Likewise.
(REG_CLASS_CONTENTS): Likewise.
(CLASS_MAX_NREGS): Handle VPR.
* config/arm/arm.cc (arm_hard_regno_nregs): Handle VPR.
gcc/config/arm/arm.cc
gcc/config/arm/arm.h