[PATCH] D57504: RFC: Prototype & Roadmap for vector predication in LLVM
Robin Kruppe via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 2 12:42:47 PST 2020
rkruppe added a comment.
In D57504#1853671 <https://reviews.llvm.org/D57504#1853671>, @programmerjake wrote:
> We (Libre-SoC, provisionally renamed from Libre-RISCV) are currently building a processor that supports variable-length vector operations by having each operation specify the starting register in a flat register file, then relying on VL telling it how many elements to operate on, which, when divided by the number of elements per register, directly translates to the number of registers to operate on. So, if VL is out of bounds, the instructions can overwrite registers past the end of the range assigned by the register allocator and/or trap. This would probably force use of option #1 above, at least for our processor. Our ISA design is still incomplete, so we might add (or already have) a mechanism allowing use of option #2 or #3 if there is a sufficient reason (will have to see what the rest of Libre-SoC think).
Presumably you have an efficient way to somehow force the VL into the intended range to support strip-mining of loops? The exact strategy doesn't matter, anything that avoids VL being "out of bounds" should make the other options work just fine. (Assuming there aren't other, larger problems with mapping VP operations to your ISA.)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57504/new/
https://reviews.llvm.org/D57504
More information about the llvm-commits
mailing list