[PATCH] D70609: [DDG] Data Dependence Graph - Topological Sort

Bardia Mahjour via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 22 11:02:26 PST 2019


bmahjour created this revision.
bmahjour added reviewers: Meinersbur, fhahn, myhsu, xtian, dmgreen, kbarton, jdoerfert.
bmahjour added a project: LLVM.

In this patch the DDG DAG is sorted topologically to put the nodes in the graph in the order that would satisfy all dependencies. This helps transformations that would like to generate code based on the DDG. Since the DDG is a DAG a reverse-post-order traversal would give us the topological ordering. This patch also sorts the basic blocks passed to the builder based on program order to ensure that the dependencies are computed in the correct direction.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D70609

Files:
  llvm/include/llvm/Analysis/DDG.h
  llvm/include/llvm/Analysis/DependenceGraphBuilder.h
  llvm/lib/Analysis/DDG.cpp
  llvm/lib/Analysis/DependenceGraphBuilder.cpp
  llvm/test/Analysis/DDG/basic-a.ll
  llvm/test/Analysis/DDG/basic-b.ll
  llvm/test/Analysis/DDG/basic-loopnest.ll
  llvm/test/Analysis/DDG/root-node.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70609.230687.patch
Type: text/x-patch
Size: 44023 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191122/4bc7ff02/attachment.bin>


More information about the llvm-commits mailing list