[ARC] Reimplement ZOL support

Programming / Compilers / GCC - claziss [138bc75d-0d04-0410-961f-82ee72b054a4] - 1 September 2017 07:43 EDT

2017-05-22 Claudiu Zissulescu

- 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

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

f188517 [ARC] Reimplement ZOL support.
gcc/ChangeLog | 36 ++
gcc/config/arc/arc-c.c | 2 +
gcc/config/arc/arc.c | 717 ++++++++++++++++++----------------
gcc/config/arc/arc.h | 10 +-
gcc/config/arc/arc.md | 419 ++++++--------------
gcc/config/arc/arc.opt | 25 ++
gcc/config/arc/predicates.md | 2 +
gcc/doc/invoke.texi | 14 +-
gcc/testsuite/ChangeLog | 4 +
gcc/testsuite/gcc.target/arc/loop-1.c | 45 ---
10 files changed, 584 insertions(+), 690 deletions(-)

Upstream: gcc.gnu.org


  • Share