From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Daniel Henrique Barboza <dbarboza@ventanamicro.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"open list:RISC-V" <qemu-riscv@nongnu.org>
Cc: Palmer Dabbelt <palmer@dabbelt.com>,
Jeff Law <jlaw@ventanamicro.com>,
Richard Henderson <richard.henderson@linaro.org>,
Alistair Francis <alistair.francis@wdc.com>
Subject: Re: [RFC] risc-v vector (RVV) emulation performance issues
Date: Mon, 24 Jul 2023 17:23:12 +0200 [thread overview]
Message-ID: <b2e8694b-af1a-777f-0b7b-8ecb44289093@linaro.org> (raw)
In-Reply-To: <0e54c6c1-2903-7942-eff2-2b8c5e21187e@ventanamicro.com>
On 24/7/23 15:40, Daniel Henrique Barboza wrote:
> Hi,
>
> As some of you are already aware the current RVV emulation could be faster.
> We have at least one commit (bc0ec52eb2, "target/riscv/vector_helper.c:
> skip set tail when vta is zero") that tried to address at least part of the
> problem.
> First thing that caught my attention is vext_ldst_us from
> target/riscv/vector_helper.c:
>
> /* load bytes from guest memory */
> for (i = env->vstart; i < evl; i++, env->vstart++) {
> k = 0;
> while (k < nf) {
> target_ulong addr = base + ((i * nf + k) << log2_esz);
> ldst_elem(env, adjust_addr(env, addr), i + k * max_elems,
> vd, ra);
> k++;
> }
> }
> env->vstart = 0;
>
> Given that this is a unit-stride load that access contiguous elements in
> memory it
> seems that this loop could be optimized/removed since it's
> loading/storing bytes
> one by one. I didn't find any TCG op to do that though. I assume that
> ARM SVE might
> have something of the sorts. Richard, care to comment?
Have you looked at the "tcg/tcg-op-gvec-common.h" API?
next prev parent reply other threads:[~2023-07-24 15:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-24 13:40 [RFC] risc-v vector (RVV) emulation performance issues Daniel Henrique Barboza
2023-07-24 15:23 ` Philippe Mathieu-Daudé [this message]
2023-07-25 18:53 ` 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=b2e8694b-af1a-777f-0b7b-8ecb44289093@linaro.org \
--to=philmd@linaro.org \
--cc=alistair.francis@wdc.com \
--cc=dbarboza@ventanamicro.com \
--cc=jlaw@ventanamicro.com \
--cc=palmer@dabbelt.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=richard.henderson@linaro.org \
/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).