[PATCH] D70609: [DDG] Data Dependence Graph - Topological Sort
Michael Kruse via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 2 09:20:41 PST 2019
Meinersbur added inline comments.
================
Comment at: llvm/lib/Analysis/DependenceGraphBuilder.cpp:369
+ const NodeListType &PiBlockMembers = getNodesInPiBlock(*N);
+ NodesInPO.insert(NodesInPO.end(), PiBlockMembers.begin(),
+ PiBlockMembers.end());
----------------
[suggestion] Consider adding a comment that pi-nodes are appended to the end of the node list (and why).
================
Comment at: llvm/lib/Analysis/DependenceGraphBuilder.cpp:374
+
+ size_t OldSize = Graph.Nodes.size();
+ Graph.Nodes.clear();
----------------
[serious] This will a emit warning "unused value" in non-assert builds.
================
Comment at: llvm/lib/Analysis/DependenceGraphBuilder.cpp:376
+ Graph.Nodes.clear();
+ for (NodeType *N : make_range(NodesInPO.rbegin(), NodesInPO.rend()))
+ Graph.Nodes.push_back(N);
----------------
[style] Use `llvm::reverse`
```
for (NodeType *N : reverse(NodesInPO))
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70609/new/
https://reviews.llvm.org/D70609
More information about the llvm-commits
mailing list