[PATCH v2 0/3] Hexagon (target/hexagon) Only pass env to generated helper when needed

Taylor Simpson posted 3 patches 9 months, 3 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20240206005034.267283-1-ltaylorsimpson@gmail.com
Maintainers: Brian Cain <bcain@quicinc.com>
There is a newer version of this series
target/hexagon/gen_tcg.h            |  3 ++
target/hexagon/macros.h             |  4 +--
target/hexagon/attribs_def.h.inc    |  1 +
target/hexagon/gen_helper_protos.py | 10 ++++++-
target/hexagon/hex_common.py        | 44 +++++++++++++++++++++++++----
5 files changed, 54 insertions(+), 8 deletions(-)
[PATCH v2 0/3] Hexagon (target/hexagon) Only pass env to generated helper when needed
Posted by Taylor Simpson 9 months, 3 weeks ago
Currently, we pass env to every generated helper.  When the semantics of
the instruction only depend on the arguments, this is unnecessary and
adds extra overhead to the helper call.

**** Changes in v2 ****
- Separate patches to pass P0 and SP explicitly to helpers that need it
- Add the TCG_CALL_NO_RWG_SE flag to any non-HVX helpers that
  don't get ptr to env

Taylor Simpson (3):
  Hexagon (target/hexagon) Pass P0 explicitly to helpers that need it
  Hexagon (target/hexagon) Pass SP explicitly to helpers that need it
  Hexagon (target/hexagon) Only pass env to generated helper when needed

 target/hexagon/gen_tcg.h            |  3 ++
 target/hexagon/macros.h             |  4 +--
 target/hexagon/attribs_def.h.inc    |  1 +
 target/hexagon/gen_helper_protos.py | 10 ++++++-
 target/hexagon/hex_common.py        | 44 +++++++++++++++++++++++++----
 5 files changed, 54 insertions(+), 8 deletions(-)

-- 
2.34.1
Re: [PATCH v2 0/3] Hexagon (target/hexagon) Only pass env to generated helper when needed
Posted by Anton Johansson via 9 months, 3 weeks ago
On 06/02/24, Taylor Simpson wrote:
> Currently, we pass env to every generated helper.  When the semantics of
> the instruction only depend on the arguments, this is unnecessary and
> adds extra overhead to the helper call.
> 
> **** Changes in v2 ****
> - Separate patches to pass P0 and SP explicitly to helpers that need it
> - Add the TCG_CALL_NO_RWG_SE flag to any non-HVX helpers that
>   don't get ptr to env
> 
> Taylor Simpson (3):
>   Hexagon (target/hexagon) Pass P0 explicitly to helpers that need it
>   Hexagon (target/hexagon) Pass SP explicitly to helpers that need it
>   Hexagon (target/hexagon) Only pass env to generated helper when needed
> 
>  target/hexagon/gen_tcg.h            |  3 ++
>  target/hexagon/macros.h             |  4 +--
>  target/hexagon/attribs_def.h.inc    |  1 +
>  target/hexagon/gen_helper_protos.py | 10 ++++++-
>  target/hexagon/hex_common.py        | 44 +++++++++++++++++++++++++----
>  5 files changed, 54 insertions(+), 8 deletions(-)
> 
> -- 
> 2.34.1
> 

Series:
Reviewed-by: Anton Johansson <anjo@rev.ng>
Tested-by: Anton Johansson <anjo@rev.ng>

-- 
Anton Johansson
rev.ng Labs Srl.