[PATCH] D86589: (Expensive) Check for Loop, SCC and Region pass return status

Mikael Holmén via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 3 03:03:56 PDT 2020


uabelho added inline comments.


================
Comment at: llvm/lib/IR/StructuralHash.cpp:51
+
+      const Instruction *Term = BB->getTerminator();
+      for (unsigned i = 0, e = Term->getNumSuccessors(); i != e; ++i) {
----------------
Hi!
What if the BB doesn't have a terminator at all? Then Term will be nullptr which I don't think is good..

(This happens for us in the unit test PassManager.CallGraphUpdater0 with expensive checks when we run in our downstream clone)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86589



More information about the llvm-commits mailing list