> -----Original Message-----
> From: Matheus Tavares Bernardino <[email protected]>
> Sent: Wednesday, May 24, 2023 9:42 AM
> To: [email protected]
> Cc: Taylor Simpson <[email protected]>; Brian Cain
> <[email protected]>; Marco Liebel (QUIC) <[email protected]>;
> Alessandro Di Federico <[email protected]>; Anton Johansson <[email protected]>
> Subject: [PATCH v2 1/2] target/hexagon/*.py: clean up used 'toss' and
> 'numregs' vars
> 
> Many Hexagon python scripts call hex_common.get_tagregs(), but only one
> call site use the full reg structure given by this function. To make the code
> cleaner, let's make get_tagregs() filter out the unused fields (i.e. 'toss' 
> and
> 'numregs'), properly removed the unused variables at the call sites. The
> hex_common.bad_register() function is also adjusted to work exclusively with
> 'regtype' and 'regid' args. For the single call site that does use 
> toss/numregs,
> we provide an optional parameter to
> get_tagregs() which will restore the old full behavior.
> 
> Suggested-by: Taylor Simpson <[email protected]>
> Signed-off-by: Matheus Tavares Bernardino <[email protected]>
> ---
>  target/hexagon/gen_analyze_funcs.py     | 10 +++---
>  target/hexagon/gen_helper_funcs.py      | 30 ++++++++--------
>  target/hexagon/gen_helper_protos.py     | 22 ++++++------
>  target/hexagon/gen_idef_parser_funcs.py |  4 +--
>  target/hexagon/gen_op_regs.py           |  4 +--
>  target/hexagon/gen_tcg_funcs.py         | 46 ++++++++++++-------------
>  target/hexagon/hex_common.py            | 24 ++++++-------
>  7 files changed, 70 insertions(+), 70 deletions(-)

Reviewed-by: Taylor Simpson <[email protected]>
Tested-by: Taylor Simpson <[email protected]>

Queued to hex.next



Reply via email to