[llvm-branch-commits] [VE] Port LVLGen to NewPM (PR #237833)

Matt Arsenault via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sun Nov 1 21:07:23 PST 2026


================
@@ -47,15 +49,17 @@ int LVLGen::getVLIndex(unsigned Opcode) {
 
 // returns a register holding a vector length. NoRegister is returned when
 // this MI does not have a vector length.
-unsigned LVLGen::getVL(const MachineInstr &MI) {
-  int Index = getVLIndex(MI.getOpcode());
+static unsigned getVL(const MachineInstr &MI, const TargetInstrInfo *TII) {
+  int Index = getVLIndex(MI.getOpcode(), TII);
   if (Index >= 0)
     return MI.getOperand(Index).getReg();
 
   return VE::NoRegister;
 }
 
-bool LVLGen::runOnMachineBasicBlock(MachineBasicBlock &MBB) {
+static bool runLVLGenOnMachineBasicBlock(MachineBasicBlock &MBB,
+                                         const TargetInstrInfo *TII,
+                                         const TargetRegisterInfo *TRI) {
----------------
arsenm wrote:

```suggestion
                                         const VEInstrInfo *TII,
                                         const VERegisterInfo *TRI) {
```

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


More information about the llvm-branch-commits mailing list