[PATCH] D36107: [PostDom] document the current handling of infinite loops and unreachables

Jakub Kuderski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 31 21:54:03 PDT 2017


kuhar added inline comments.


================
Comment at: unittests/IR/DominatorTreeTest.cpp:330
+// Verify that the PDT is correctly updated in case an edge removal results
+// in a new unreachable node.
+//
----------------
s/node/CFG node?


================
Comment at: unittests/IR/DominatorTreeTest.cpp:417
+// Verify that the PDT is correctly updated in case an edge removal results
+// in an infinite loop.
+//
----------------
Doesn't this test case start with two infinite loops and breaks one of them?
Maybe it would be better to show a case when there used to be an exit which got disconnected?
(Eg. additional initial edge C -> E which gets deleted in an update.)


================
Comment at: unittests/IR/DominatorTreeTest.cpp:434
+//
+// After deleting the edge C->B, C is part of an infinite backwards unreachable
+// loop:
----------------
The comments in GenericDomTreeConstruction use reverse-unreachable instead of backwards unreachable. I think it would be better to stick with one name for it everywhere.


https://reviews.llvm.org/D36107





More information about the llvm-commits mailing list