[llvm] [RISCV][VLOPT] Allow users that are passthrus if tail elements aren't demanded (PR #124066)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 27 06:34:07 PST 2025


lukel97 wrote:

> Given that we're checking the demanded VL of the users downwards, and we iterate upwards over each block, it might be possible to memoize the result of checkUsers? We would need to invalidate it whenever we reduce a VL though. I'll have a think about this tonight anyway to see if there's another approach.

The solution I ended up with is in #124530. It turns out we don't need to invalidate anything because the demanded VL never changes: We can compute the minimum possible VL for each instruction up front without needing to mutate anything.

I'll rebase this PR on top of it once it's landed, as well as #124549 which was split off to help explain some diffs.

https://github.com/llvm/llvm-project/pull/124066


More information about the llvm-commits mailing list