[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH 7/8] Hexagon (target/hexagon) Use direct block chaining for d
From: |
Taylor Simpson |
Subject: |
RE: [PATCH 7/8] Hexagon (target/hexagon) Use direct block chaining for direct jump/branch |
Date: |
Thu, 20 Oct 2022 16:56:51 +0000 |
> -----Original Message-----
> From: Matheus Tavares Bernardino <quic_mathbern@quicinc.com>
> Sent: Thursday, October 20, 2022 10:25 AM
> To: Taylor Simpson <tsimpson@quicinc.com>
> Cc: ale@rev.ng; anjo@rev.ng; Brian Cain <bcain@quicinc.com>;
> philmd@linaro.org; qemu-devel@nongnu.org; Matheus Bernardino (QUIC)
> <quic_mathbern@quicinc.com>; richard.henderson@linaro.org
> Subject: Re: [PATCH 7/8] Hexagon (target/hexagon) Use direct block chaining
> for direct jump/branch
>
>
> Do we want to perform this logic at gen_write_new_pc_addr() as well?
>
> Although, in that case, we would need a separate ctx->branch_dest to hold a
> TCGv instead of target_ulong...
>
> Or have a single variable (TCGv) but add an extra tcg_gen_addi(ctx-
> >branch_dest, tcg_gen_constant_tl(pkt->pc), pc_off) call to
> gen_write_new_pc_pcrel(). (In which case, we could also unify the two
> gen_write_new_pc_* functions and have one as a thin wrapper around the
> other.) IDK about the extra overhead from tcg_gen_addi(), though.
We get the best performance from direct block chaining when the destination is
a constant at translation time (i.e., a direct branch) because we can use
goto_tb + exit_tb.
Take a look at gen_end_tb in translate.c to see how this is ultimately done.
For a single direct branch and a tight loop, we get the best performance.
Otherwise, we use tcg_gen_lookup_and_goto_ptr which is still better than what
we were doing before.
Thanks,
Taylor
- [PATCH 6/8] Hexagon (target/hexagon) Add overrides for various forms of jump, (continued)
- [PATCH 6/8] Hexagon (target/hexagon) Add overrides for various forms of jump, Taylor Simpson, 2022/10/19
- [PATCH 2/8] Hexagon (target/hexagon) Remove PC from the runtime state, Taylor Simpson, 2022/10/19
- [PATCH 1/8] Hexagon (target/hexagon) Only use branch_taken when packet has multi cof, Taylor Simpson, 2022/10/19
- [PATCH 4/8] Hexagon (target/hexagon) Add overrides for direct call instructions, Taylor Simpson, 2022/10/19
- [PATCH 3/8] Hexagon (target/hexagon) Remove next_PC from runtime state, Taylor Simpson, 2022/10/19
- [PATCH 5/8] Hexagon (target/hexagon) Add overrides for compound compare and jump, Taylor Simpson, 2022/10/19
- [PATCH 7/8] Hexagon (target/hexagon) Use direct block chaining for direct jump/branch, Taylor Simpson, 2022/10/19
- [PATCH 8/8] Hexagon (target/hexagon) Use direct block chaining for tight loops, Taylor Simpson, 2022/10/19