[llvm] [RISCV] Move RISCVInsertVSETVLI to after phi elimination (PR #91440)

Piyou Chen via llvm-commits llvm-commits at lists.llvm.org
Mon May 13 07:09:57 PDT 2024


================
@@ -426,7 +438,8 @@ DemandedFields getDemanded(const MachineInstr &MI, const RISCVSubtarget *ST) {
 /// values of the VL and VTYPE registers after insertion.
 class VSETVLIInfo {
   struct AVLDef {
-    const MachineInstr *DefMI;
+    // Every AVLDef should have a VNInfo.
+    const VNInfo *VNInfo;
----------------
BeMg wrote:

This renaming exists a potential compilation error during the LLVM building. 

gcc version: 8.5.0

```
llvm-project/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp:442:19: error: declaration of ‘const llvm::VNInfo* {anonymous}::VSETVLIInfo::AVLDef::VNInfo’ [-fpermissive]
     const VNInfo *VNInfo;
                   ^~~~~~
In file included from llvm-project/llvm/include/llvm/CodeGen/LiveIntervals.h:25,
                 from llvm-project/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp:31:
llvm-project/llvm/include/llvm/CodeGen/LiveInterval.h:53:9: error: changes meaning of ‘VNInfo’ from ‘class llvm::VNInfo’ [-fpermissive]
   class VNInfo {
         ^~~~~~
```

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


More information about the llvm-commits mailing list