[llvm] [RISCV] Keep AVLReg define instr inside VSETVLInfo (PR #89180)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 22 01:08:24 PDT 2024
================
@@ -478,6 +480,8 @@ class VSETVLIInfo {
State = AVLIsImm;
}
+ void setAVLDefMI(const MachineInstr *DefMI) { AVLDefMI = DefMI; }
----------------
lukel97 wrote:
Can we go further and remove the `AVLIsReg` state entirely? I think we have the invariant that the AVL should be one of three types:
- A virtual register where we can get the definition
- X0, which is really just VLMAX
- An immediate
So I was thinking we could make the state something like
```c++
enum : uint8_t {
Uninitialized,
AVLIsDef,
AVLIsVLMAX
AVLIsImm,
Unknown,
} State = Uninitialized;
```
https://github.com/llvm/llvm-project/pull/89180
More information about the llvm-commits
mailing list