[PATCH] D103269: [RISCV] Reserve an emergency spill slot for any RVV spills

Hsiangkai Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 1 23:46:24 PDT 2021


HsiangKai added a comment.

In D103269#2792895 <https://reviews.llvm.org/D103269#2792895>, @frasercrmck wrote:

> Ah that's interesting, thanks both for the input. I've actually done both of those things in other backends and wasn't a huge fan of either approach. I found the flag to be quite brittle and didn't like how we had to clean up the redundant addressing instructions to get the best code.
>
> I don't anticipate a large increase in compile time, since it's only called once per function and should have early exits. One thing I forgot to include was that `hasRVVSpillWithFIs` can (presumably) safely return `false` if `!Subtarget.hasStdExtV()`. That will limit the impact on non-V code. The flag would no doubt be faster, of course, in terms of compile time. I can run some tests on the larger kernels we're producing if you like.

Add `Subtarget.hasStdExtV()` checking to avoid the impact on non-V code is a good idea.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103269/new/

https://reviews.llvm.org/D103269



More information about the llvm-commits mailing list