xtensa: Prepare the transition from Reload to LRA
authorTakayuki 'January June' Suwa <jjsuwa_sys3175@yahoo.co.jp>
Wed, 19 Oct 2022 08:16:24 +0000 (17:16 +0900)
committerMax Filippov <jcmvbkbc@gmail.com>
Wed, 19 Oct 2022 11:29:00 +0000 (04:29 -0700)
commit4f3f0296acbb99a0fa2867986956e53e487206a9
treef85733002515bd1855a03ae877f15426b815118f
parent95c5cffb712d90bfe36f2cf71d3a052b8068db34
xtensa: Prepare the transition from Reload to LRA

This patch provides the first step in the transition from Reload to LRA
in Xtensa.

gcc/ChangeLog:

* config/xtensa/xtensa-protos.h
(xtensa_split1_finished_p, xtensa_split_DI_reg_imm): New prototypes.
* config/xtensa/xtensa.cc
(xtensa_split1_finished_p, xtensa_split_DI_reg_imm, xtensa_lra_p):
New functions.
(TARGET_LRA_P): Replace the dummy hook with xtensa_lra_p.
(xt_true_regnum): Rework.
* config/xtensa/xtensa.h (CALL_REALLY_USED_REGISTERS):
Switch from CALL_USED_REGISTERS, and revise the comment.
* config/xtensa/constraints.md (Y):
Use !xtensa_split1_finished_p() instead of can_create_pseudo_p().
* config/xtensa/predicates.md (move_operand): Ditto.
* config/xtensa/xtensa.md: Add two new split patterns:
  - splits DImode immediate load into two SImode ones
  - puts out-of-constraint SImode constants into the constant pool
* config/xtensa/xtensa.opt (-mlra): New target-specific option
for testing purpose.
gcc/config/xtensa/constraints.md
gcc/config/xtensa/predicates.md
gcc/config/xtensa/xtensa-protos.h
gcc/config/xtensa/xtensa.cc
gcc/config/xtensa/xtensa.h
gcc/config/xtensa/xtensa.md
gcc/config/xtensa/xtensa.opt