[PATCH] D75033: [MachineVerifier] Doing ::calcRegsPassed over faster sets: ~15-20% faster MV

Mark Lacey via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 24 15:24:38 PST 2020


rudkx added inline comments.


================
Comment at: llvm/lib/CodeGen/MachineVerifier.cpp:2131
+    for (unsigned Reg : FromRegSet)
+      if (Register::isVirtualRegister(Reg)) {
+        unsigned Index = Register::virtReg2Index(Reg);
----------------
You could reduce indentation here by adding braces around the body of the `for` loop, inverting the condition, and using `continue`, per https://www.llvm.org/docs/CodingStandards.html#use-early-exits-and-continue-to-simplify-code.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75033





More information about the llvm-commits mailing list