[ARC] Reimplement ZOL support.
authorClaudiu Zissulescu <claziss@synopsys.com>
Fri, 1 Sep 2017 11:43:51 +0000 (13:43 +0200)
committerClaudiu Zissulescu <claziss@gcc.gnu.org>
Fri, 1 Sep 2017 11:43:51 +0000 (13:43 +0200)
commita2de90a45a9193cb19a5837110698fe59d6deb41
treeefe25ca85f6d3a5f7496251262247e817b30cc0e
parent782bdf21895dc769cfd85a08c8c1b780924775f3
[ARC] Reimplement ZOL support.

2017-05-22  Claudiu Zissulescu <claziss@synopsys.com>

* config/arc/arc-c.c (__ARC_LPC_WIDTH__): Add builtin define.
* config/arc/arc.c (ARC_MAX_LOOP_LENGTH): Define.
(arc_conditional_register_usage): Remove ARC600 lp_count
exception.
(arc_file_start): Emit Tag_ARC_CPU_variation.
(arc_can_use_doloop_p): New conditions to use ZOLs.
(hwloop_fail): New function.
(hwloop_optimize): Likewise.
(hwloop_pattern_reg): Likewise.
(arc_doloop_hooks): New struct, to be used with reorg_loops.
(arc_reorg_loops): New function, calls reorg_loops.
(arc_reorg): Call arc_reorg_loops.  Remove old ZOL handling.
(arc600_corereg_hazard): Remove ZOL checking, case handled by
hwloop_optimize.
(arc_loop_hazard): Remove function, functionality moved into
hwloop_optimize.
(arc_hazard): Remove arc_loop_hazard call.
(arc_adjust_insn_length): Remove ZOL handling, functionality moved
into hwloop_optimize.
(arc_label_align): Remove ZOL handling.
* config/arc/arc.h (LOOP_ALIGN): Changed to 0.
* config/arc/arc.md (doloop_begin): Remove pattern.
(doloop_begin_i): Likewise.
(doloop_end_i): Likewise.
(doloop_fallback): Likewise.
(doloop_fallback_m): Likewise.
(doloop_end): Reimplement expand.
(arc_lp): New pattern for LP instruction.
(loop_end): New pattern.
(loop_fail): Likewise.
(decrement_and_branch_until_zero): Likewise.
* config/arc/arc.opt (mlpc-width): New option.
* doc/invoke.texi (mlpc-width): Document option.

testsuite/
2017-05-22  Claudiu Zissulescu <claziss@synopsys.com>

      * gcc.target/arc/loop-1.c: Deleted.

From-SVN: r251589
gcc/ChangeLog
gcc/config/arc/arc-c.c
gcc/config/arc/arc.c
gcc/config/arc/arc.h
gcc/config/arc/arc.md
gcc/config/arc/arc.opt
gcc/config/arc/predicates.md
gcc/doc/invoke.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arc/loop-1.c [deleted file]