[PATCH] D72713: [ARM][LowOverheadLoops] Check loop liveouts

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 18 07:12:06 PST 2020


SjoerdMeijer added a comment.

A few more comments while I am looking in more detail at the tests now.



================
Comment at: llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp:519
+  for (auto *MBB : ExitBlocks)
+    for (const MachineBasicBlock::RegisterMaskPair &RegMask : MBB->liveins())
+      if (QPRs->contains(RegMask.PhysReg))
----------------
nit: `for (const auto &RegMask ..)`


================
Comment at: llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp:537
+  // instruction needs to be predicated, so check this here.
+  for (auto *MI : LiveMIs) {
+    int PIdx = llvm::findFirstVPTPredOperandIdx(*MI);
----------------
Looks like we don't need this loop (and insert instructions in `LiveMIs`), the `findFirstVPTPredOperandIdx()` can be done directly in the loop above.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72713/new/

https://reviews.llvm.org/D72713





More information about the llvm-commits mailing list