[PATCH] D78586: [MachineVerifier] Add more checks for registers in live-in lists.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 27 17:16:48 PDT 2020


efriedma marked 2 inline comments as done.
efriedma added inline comments.


================
Comment at: llvm/lib/CodeGen/MachineVerifier.cpp:2472
+          bool FoundPred = false;
+          for (MCRegAliasIterator AliasingRegs(LiveInReg, TRI, true);
+               AliasingRegs.isValid(); ++AliasingRegs) {
----------------
nickdesaulniers wrote:
> does this `AliasingRegs` shadow `AliasingRegs` declared on line 2470?
Oh, oops, I didn't mean to declare it twice.


================
Comment at: llvm/lib/CodeGen/MachineVerifier.cpp:2478
+            }
+          }
+          if (!FoundPred) {
----------------
nickdesaulniers wrote:
> looks like `llvm::any_of` can be used here?
There isn't any way to construct a range out of an MCRegAliasIterator; there isn't any end iterator.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78586





More information about the llvm-commits mailing list