From: Richard Henderson <richard.henderson@linaro.org>
To: Taylor Simpson <tsimpson@quicinc.com>, qemu-devel@nongnu.org
Cc: philmd@linaro.org, ale@rev.ng, anjo@rev.ng, bcain@quicinc.com,
quic_mathbern@quicinc.com
Subject: Re: [PATCH v3 10/11] Hexagon (target/hexagon) Use direct block chaining for direct jump/branch
Date: Sat, 5 Nov 2022 12:33:03 +1100 [thread overview]
Message-ID: <1a998d59-4302-06f9-c62f-aba2079a0238@linaro.org> (raw)
In-Reply-To: <20221104192631.29434-11-tsimpson@quicinc.com>
On 11/5/22 06:26, Taylor Simpson wrote:
> Direct block chaining is documented here
> https://qemu.readthedocs.io/en/latest/devel/tcg.html#direct-block-chaining
>
> Recall that Hexagon allows packets with multiple jumps where only the first
> one with a true predicate will actually jump. So, we can only use direct
> block chaining when the packet contains a single PC-relative jump.
Not quite accurate.
Only the first two direct branches can use direct block chaining. Other exits from the
translation block could use indirect block chaining (tcg_gen_lookup_and_goto_ptr). You
just have to remember which is taken.
That said, this is certainly an improvement.
> + if (ctx->pkt->pkt_has_multi_cof) {
> + gen_write_new_pc_addr(ctx, tcg_constant_tl(dest), pred);
> + } else {
> + /* Defer this jump to the end of the TB */
> + g_assert(ctx->branch_cond == NULL);
> + ctx->has_single_direct_branch = true;
> + if (pred != NULL) {
> + ctx->branch_cond = tcg_temp_local_new();
> + tcg_gen_mov_tl(ctx->branch_cond, pred);
> + }
> + ctx->branch_dest = dest;
Perhaps re-use hex_branch_taken as branch_cond?
Anyway,
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
next prev parent reply other threads:[~2022-11-05 1:34 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-04 19:26 [PATCH v3 00/11] Hexagon (target/hexagon) performance and bug fixes Taylor Simpson
2022-11-04 19:26 ` [PATCH v3 01/11] Hexagon (target/hexagon) Add pkt and insn to DisasContext Taylor Simpson
2022-11-04 22:46 ` Richard Henderson
2022-11-04 19:26 ` [PATCH v3 02/11] Hexagon (target/hexagon) Fix predicated assignment to .tmp and .cur Taylor Simpson
2022-11-04 22:50 ` Richard Henderson
2022-11-04 19:26 ` [PATCH v3 03/11] Hexagon (target/hexagon) Add overrides for S2_asr_r_r_sat/S2_asl_r_r_sat Taylor Simpson
2022-11-04 23:59 ` Richard Henderson
2022-11-04 19:26 ` [PATCH v3 04/11] Hexagon (target/hexagon) Only use branch_taken when packet has multi cof Taylor Simpson
2022-11-05 0:04 ` Richard Henderson
2022-11-04 19:26 ` [PATCH v3 05/11] Hexagon (target/hexagon) Remove PC from the runtime state Taylor Simpson
2022-11-05 0:07 ` Richard Henderson
2022-11-04 19:26 ` [PATCH v3 06/11] Hexagon (target/hexagon) Remove next_PC from " Taylor Simpson
2022-11-05 0:10 ` Richard Henderson
2022-11-04 19:26 ` [PATCH v3 07/11] Hexagon (target/hexagon) Add overrides for direct call instructions Taylor Simpson
2022-11-05 0:12 ` Richard Henderson
2022-11-05 0:19 ` Richard Henderson
2022-11-05 0:21 ` Richard Henderson
2022-11-04 19:26 ` [PATCH v3 08/11] Hexagon (target/hexagon) Add overrides for compound compare and jump Taylor Simpson
2022-11-05 0:15 ` Richard Henderson
2022-11-04 19:26 ` [PATCH v3 09/11] Hexagon (target/hexagon) Add overrides for various forms of jump Taylor Simpson
2022-11-05 0:22 ` Richard Henderson
2022-11-04 19:26 ` [PATCH v3 10/11] Hexagon (target/hexagon) Use direct block chaining for direct jump/branch Taylor Simpson
2022-11-05 1:33 ` Richard Henderson [this message]
2022-11-06 21:46 ` Taylor Simpson
2022-11-04 19:26 ` [PATCH v3 11/11] Hexagon (target/hexagon) Use direct block chaining for tight loops Taylor Simpson
2022-11-05 1:44 ` Richard Henderson
2022-11-06 21:52 ` Taylor Simpson
2022-11-06 23:12 ` Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1a998d59-4302-06f9-c62f-aba2079a0238@linaro.org \
--to=richard.henderson@linaro.org \
--cc=ale@rev.ng \
--cc=anjo@rev.ng \
--cc=bcain@quicinc.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=quic_mathbern@quicinc.com \
--cc=tsimpson@quicinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).