[ARC] Cleanup, fix and set LRA default.
commit8cb63fa629d3bcdfaceada7d4cb32a06c3f359b8
authorclaziss <claziss@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 14 Nov 2018 09:45:39 +0000 (14 09:45 +0000)
committerclaziss <claziss@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 14 Nov 2018 09:45:39 +0000 (14 09:45 +0000)
treeff77dc94be6a2fdc615f58972801946866293c45
parent8f972a4168c8821b91bb7fdcd62669dfbd847f0a
[ARC] Cleanup, fix and set LRA default.

LP_COUNT register cannot be freely allocated by the compiler as it
size, and/or content may change depending on the ARC hardware
configuration. Thus, make this register fixed.

Remove register classes and unused constraint letters.

Cleanup the implementation of conditional_register_usage hook by using
macros instead of magic constants and removing all references to
reg_class_contents which are bringing so much grief when lra is enabled.

gcc/
xxxx-xx-xx  Claudiu Zissulescu  <claziss@synopsys.com>

* config/arc/arc.h (reg_class): Reorder registers classes, remove
unused register classes.
(REG_CLASS_NAMES): Likewise.
(REG_CLASS_CONTENTS): Likewise.
(FIXED_REGISTERS): Make lp_count fixed.
(BASE_REG_CLASS): Remove ACC16_BASE_REGS reference.
(PROGRAM_COUNTER_REGNO): Remove.
* config/arc/arc.c (arc_conditional_register_usage): Remove unused
register classes, use constants for register numbers, remove
reg_class_contents references.
(arc_process_double_reg_moves): Add asserts.
(arc_secondary_reload): Remove LPCOUNT_REG reference, use
lra_in_progress predicate.
(arc_init_reg_tables): Remove unused register classes.
(arc_register_move_cost): Likewise.
(arc_preferred_reload_class): Likewise.
(hwloop_optimize): Update rtx patterns involving lp_count
register.
(arc_return_address_register): Rename ILINK1, INLINK2 regnums
macros.
* config/arc/constraints.md ("c"): Choose between GENERAL_REGS and
CHEAP_CORE_REGS.  Former one will be used for LRA.
("Rac"): Choose between GENERAL_REGS and ALL_CORE_REGS.  Former
one will be used for LRA.
("w"): Choose between GENERAL_REGS and WRITABLE_CORE_REGS.  Former
one will be used for LRA.
("W"): Choose between GENERAL_REGS and MPY_WRITABLE_CORE_REGS.
Former one will be used for LRA.
("f"): Delete constraint.
("k"): Likewise.
("e"): Likewise.
("l"): Change it from register constraint to constraint.
* config/arc/arc.md (movqi_insn): Remove unsed lp_count constraints.
(movhi_insn): Likewise.
(movsi_insn): Update pattern.
(arc_lp): Likewise.
(dbnz): Likewise.
(stack_tie): Remove 'b' constraint letter.
(R4_REG): Define.
(R9_REG, R15_REG, R16_REG, R25_REG): Likewise.
(R32_REG, R40_REG, R41_REG, R42_REG, R43_REG, R44_REG): Likewise.
(R57_REG, R59_REG, PCL_REG): Likewise.
(ILINK1_REGNUM): Renamed to ILINK1_REG.
(ILINK2_REGNUM): Renamed to ILINK2_REG.
(Rgp): Remove.
(SP_REGS): Likewise.
(Rcw): Remove unused reg classes.
* config/arc/predicates.md (dest_reg_operand): Just default on
register_operand predicate.
(mpy_dest_reg_operand): Likewise.
(move_dest_operand): Use macros instead of constants.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@266100 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/arc/arc.c
gcc/config/arc/arc.h
gcc/config/arc/arc.md
gcc/config/arc/arc.opt
gcc/config/arc/constraints.md
gcc/config/arc/predicates.md