[PATCH] D47441: SafepointIRVerifier should ignore dead blocks and dead edges
Daniil Suchkov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 1 02:03:07 PDT 2018
DaniilSuchkov added inline comments.
================
Comment at: include/llvm/IR/CFGDeadness.h:47
+
+ bool isDeadEdge(const Use *U) const {
+ assert(!isDeadBlock(dyn_cast<Instruction>(U->getUser())->getParent()) &&
----------------
Please add a comment that explains what kind of uses this method expects, it isn't obvious.
================
Comment at: include/llvm/IR/CFGDeadness.h:50
+ "isDeadEdge() must be applied to edges from live blocks");
+ return DeadEdges.count(U);
+ }
----------------
Could you please add here an assertion that U->getUser() is block terminator?
================
Comment at: lib/IR/CFGDeadness.cpp:87
+void CFGDeadness::processFoldableCondBr(const BranchInst *BI) {
+ if (!BI || BI->isUnconditional())
+ return;
----------------
As Anna said before, this should be an assertion.
https://reviews.llvm.org/D47441
More information about the llvm-commits
mailing list