[llvm] [RISCV][VLOPT] Compute demanded VLs up front. NFC (PR #124530)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 27 08:45:19 PST 2025


lukel97 wrote:

> 3. The initial demanded VL is sound, but not precise.  As you reduce a transitive user, you can reduce the VL of an instruction which in turn reduces it of that instructions defs.  You backward walk achieves this within a basic block, but we loose the cross block case.

It should be possible to analyze all the blocks up front with a reverse post order traversal, which would handle the cross block case. 

I'd like to explore that case first since I'm a bit hesitant to go down the invalidation path. I'm worried it might lead to more compile time edge cases like the one in #120349 

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


More information about the llvm-commits mailing list