[PATCH] D74975: [ARM][LowOverheadLoops] Iteration count IT blocks

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 24 03:50:59 PST 2020


SjoerdMeijer added a comment.

Sorry, just double-checking and asking the usual testing question: have we covered all cases for IT-blocks? I see cases when all instructions are dead and removed, I see cases where the instruction can't be removed, but do we have a test where one can be removed, and another not? Is there an existing test checking that?



================
Comment at: llvm/lib/CodeGen/ReachingDefAnalysis.cpp:489
+    getGlobalUses(Def, PhysReg, Uses);
+    return Uses.size() == 1;
+  };
----------------
really minor nit: don't need the comparison, but can just return size and let the implicit conversion from int to bool do its work.


================
Comment at: llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp:903
+    // Collect IT blocks.
+    std::map<MachineInstr*, SmallPtrSet<MachineInstr*, 2>> ITBlocks;
+    std::map<MachineInstr*, MachineInstr*> Predicates;
----------------
nit: I think clang-format would suggest `MachineInstr *`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74975





More information about the llvm-commits mailing list