[llvm-dev] Adding support for vscale

Jacob Lifshay via llvm-dev llvm-dev at lists.llvm.org
Mon Sep 30 14:10:50 PDT 2019


On Mon, Sep 30, 2019 at 2:30 AM Sander De Smalen via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
>
> I've posted two patches on Phabricator to add support for VScale in LLVM.
>
> A brief recap on `vscale`:
> The scalable vector type in LLVM IR is defined as `<vscale x n x m>`, to create types such as `<vscale x 16 x i8>` for a scalable vector with at least 16 bytes. In the definition of the scalable type, `vscale` is specified as a positive constant of type integer that will only be known at runtime but is guaranteed to be constant throughout the program.

RISC-V RVV explicitly allows changing VL (which I am assuming is the
same as vscale) at runtime, so VL wouldn't be a constant.
Additionally, we (libre-riscv) are working on a similar scalar vectors
ISA called SimpleV that also allows changing VL at runtime and we are
planning on basing it on LLVM's scalable vector support.

>
> [1] https://reviews.llvm.org/D68202
> [2] https://reviews.llvm.org/D68203

Jacob Lifshay


More information about the llvm-dev mailing list