[PATCH] D35282: [Dominators] Split SemiNCA into smaller functions
Daniel Berlin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 11 20:33:47 PDT 2017
dberlin added inline comments.
================
Comment at: include/llvm/Support/GenericDomTreeConstruction.h:34
+#define DTB_DEBUG_TYPE "dom-tree-builder"
+#define DTB_DEBUG(Arg) DEBUG_WITH_TYPE(DTB_DEBUG_TYPE, Arg)
+
----------------
Why doesn't #define DEBUG_TYPE work?
================
Comment at: include/llvm/Support/GenericDomTreeConstruction.h:69
- std::vector<NodePtr> NumToNode;
+ std::vector<NodePtr> NumToNode = {nullptr};
DenseMap<NodePtr, InfoRec> NodeToInfo;
----------------
Why?
================
Comment at: include/llvm/Support/GenericDomTreeConstruction.h:73
void clear() {
- NumToNode.clear();
+ NumToNode = {nullptr};
NodeToInfo.clear();
----------------
Why?
================
Comment at: include/llvm/Support/GenericDomTreeConstruction.h:205
+ const TreeNodePtr TN = DT.getNode(N);
+ if (TN && TN->getLevel() < MinLevel) // Skip too shallow predecessors.
+ continue;
----------------
I'd rewrite this comment to "Skip predecessors whose level is above the subtree we are processing"
https://reviews.llvm.org/D35282
More information about the llvm-commits
mailing list