[PATCH v5 00/14] Hexagon: COF overrides, new generator, test/bug update

Taylor Simpson posted 14 patches 1 year, 1 month ago
There is a newer version of this series
target/hexagon/cpu.h                        |   5 +-
target/hexagon/gen_tcg.h                    |  82 +++-
target/hexagon/gen_tcg_hvx.h                |  17 +-
target/hexagon/macros.h                     |  31 +-
target/hexagon/op_helper.h                  |   3 +-
target/hexagon/translate.h                  |  77 +--
target/hexagon/attribs_def.h.inc            |   1 +
target/hexagon/genptr.c                     | 306 +++++++-----
target/hexagon/idef-parser/parser-helpers.c |  12 +-
target/hexagon/op_helper.c                  |  51 +-
target/hexagon/translate.c                  | 273 ++++++-----
tests/tcg/hexagon/fpstuff.c                 |  31 +-
tests/tcg/hexagon/preg_alias.c              |  10 +-
tests/tcg/hexagon/scatter_gather.c          | 513 +++++++++++---------
target/hexagon/README                       |  38 +-
target/hexagon/gen_analyze_funcs.py         | 252 ++++++++++
target/hexagon/gen_helper_funcs.py          |  19 +-
target/hexagon/gen_helper_protos.py         |  12 +-
target/hexagon/gen_tcg_funcs.py             | 166 +++----
target/hexagon/hex_common.py                |  10 +-
target/hexagon/idef-parser/idef-parser.lex  |   4 +-
target/hexagon/idef-parser/idef-parser.y    |   7 +-
target/hexagon/meson.build                  |  11 +-
tests/tcg/hexagon/Makefile.target           |  13 +-
24 files changed, 1185 insertions(+), 759 deletions(-)
create mode 100755 target/hexagon/gen_analyze_funcs.py
[PATCH v5 00/14] Hexagon: COF overrides, new generator, test/bug update
Posted by Taylor Simpson 1 year, 1 month ago
The idef-parser skips the change-of-flow (COF) instructions, so add
overrides

The new toolchain allows us to execute the HVX tests

New generator enables significant improvement to TCG generation for
predicated instructions by removing the need for slot_cancelled

**** Changes in v2 ****
Add a new generator for analyze_<tag> instructions.  Pouplate the
DisasContext ahead of generating code.

**** Changes in v3 ****
Cleanup of analysis code
Added test updates enabled by new toolchain container

**** Changes in v4 ****
Additional patch for bug fix
Remove pkt_has_store_s1 from runtime state with dealloc-return patch
New patches to utilize new analyzer to improve predicated instructions

**** Changes in v5 ****
Don't remove code that is needed for --disable-hexagon-idef-parser config
    pkt_has_store_s1 runtime field and mem_load[1248] functions
Add understanding of idef-parser to analyzer
Additional patch to determine when pkt_has_store_s1 needs to be set
Update fGEN_TCG_<tag> to preserve --disable-hexagon-idef-parser config
    in Remove gen_log_predicated_reg_write[_pair] patch
Move tcg_temp_free_i64 into gen_log_vreg_write
Add get_result_qreg function



Taylor Simpson (14):
  Hexagon (target/hexagon) Add overrides for jumpr31 instructions
  Hexagon (target/hexagon) Add overrides for callr
  Hexagon (target/hexagon) Add overrides for endloop1/endloop01
  Hexagon (target/hexagon) Add overrides for dealloc-return instructions
  Hexagon (target/hexagon) Analyze packet before generating TCG
  Hexagon (target/hexagon) Don't set pkt_has_store_s1 when not needed
  Hexagon (target/hexagon) Analyze packet for HVX
  Hexagon (tests/tcg/hexagon) Update preg_alias.c
  Hexagon (tests/tcg/hexagon) Remove __builtin from scatter_gather
  Hexagon (tests/tcg/hexagon) Enable HVX tests
  Hexagon (target/hexagon) Change subtract from zero to change sign
  Hexagon (target/hexagon) Remove gen_log_predicated_reg_write[_pair]
  Hexagon (target/hexagon) Reduce manipulation of slot_cancelled
  Hexagon (target/hexagon) Improve code gen for predicated HVX
    instructions

 target/hexagon/cpu.h                        |   5 +-
 target/hexagon/gen_tcg.h                    |  82 +++-
 target/hexagon/gen_tcg_hvx.h                |  17 +-
 target/hexagon/macros.h                     |  31 +-
 target/hexagon/op_helper.h                  |   3 +-
 target/hexagon/translate.h                  |  77 +--
 target/hexagon/attribs_def.h.inc            |   1 +
 target/hexagon/genptr.c                     | 306 +++++++-----
 target/hexagon/idef-parser/parser-helpers.c |  12 +-
 target/hexagon/op_helper.c                  |  51 +-
 target/hexagon/translate.c                  | 273 ++++++-----
 tests/tcg/hexagon/fpstuff.c                 |  31 +-
 tests/tcg/hexagon/preg_alias.c              |  10 +-
 tests/tcg/hexagon/scatter_gather.c          | 513 +++++++++++---------
 target/hexagon/README                       |  38 +-
 target/hexagon/gen_analyze_funcs.py         | 252 ++++++++++
 target/hexagon/gen_helper_funcs.py          |  19 +-
 target/hexagon/gen_helper_protos.py         |  12 +-
 target/hexagon/gen_tcg_funcs.py             | 166 +++----
 target/hexagon/hex_common.py                |  10 +-
 target/hexagon/idef-parser/idef-parser.lex  |   4 +-
 target/hexagon/idef-parser/idef-parser.y    |   7 +-
 target/hexagon/meson.build                  |  11 +-
 tests/tcg/hexagon/Makefile.target           |  13 +-
 24 files changed, 1185 insertions(+), 759 deletions(-)
 create mode 100755 target/hexagon/gen_analyze_funcs.py

-- 
2.17.1