================
@@ -123,35 +306,30 @@ class GCNCreateVOPD {
     const SIInstrInfo *SII = ST->getInstrInfo();
     bool Changed = false;
 
-    SmallVector<VOPDMatchInfo> ReplaceCandidates;
-
-    for (auto &MBB : MF) {
+    for (MachineBasicBlock &MBB : MF) {
+      SmallVector<VOPDCandidate, 8> Candidates;
       auto MII = MBB.begin(), E = MBB.end();
       while (MII != E) {
-        auto *FirstMI = &*MII;
+        MachineInstr *FirstMI = &*MII;
         MII = next_nodbg(MII, MBB.end());
         if (MII == MBB.end())
           break;
         if (FirstMI->isDebugInstr())
           continue;
-        auto *SecondMI = &*MII;
+        MachineInstr *SecondMI = &*MII;
 
         if (std::optional<VOPDMatchInfo> Match =
                 tryMatchVOPDPair(*SII, *FirstMI, *SecondMI))
-          ReplaceCandidates.push_back(std::move(*Match));
+          Candidates.push_back({std::move(*Match), Register()});
----------------
zGoldthorpe wrote:

```suggestion
          Candidates.emplace_back(std::move(*Match), Register());
```

https://github.com/llvm/llvm-project/pull/223431
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to