Hexagon (target/hexagon) Short-circuit packet HVX writes

In certain cases, we can avoid the overhead of writing to future_VRegs
and write directly to VRegs.  We consider HVX reads/writes when computing
ctx->need_commit.  Then, we can early-exit from gen_commit_hvx.

Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230427230012.3800327-14-tsimpson@quicinc.com>
This commit is contained in:
Taylor Simpson 2023-04-27 16:00:04 -07:00
parent 455e169d7c
commit b85529854e
2 changed files with 50 additions and 2 deletions

View file

@ -1104,7 +1104,11 @@ static void gen_log_vreg_write_pair(DisasContext *ctx, intptr_t srcoff, int num,
static intptr_t get_result_qreg(DisasContext *ctx, int qnum)
{
return offsetof(CPUHexagonState, future_QRegs[qnum]);
if (ctx->need_commit) {
return offsetof(CPUHexagonState, future_QRegs[qnum]);
} else {
return offsetof(CPUHexagonState, QRegs[qnum]);
}
}
static void gen_vreg_load(DisasContext *ctx, intptr_t dstoff, TCGv src,