[PATCH] D65350: [DDG] Data Dependence Graph Basics
Bardia via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 26 14:41:07 PDT 2019
bmahjour created this revision.
bmahjour added reviewers: Meinersbur, fhahn, xtian, myhsu, dmgreen, kbarton, jdoerfert.
bmahjour added a project: LLVM.
Herald added subscribers: llvm-commits, wuzish, jfb, hiraditya, mgorny.
This is the first patch in a series of patches that will implement data dependence graph in LLVM. Many of the ideas used in this implementation are based on the following paper:
D. J. Kuck, R. H. Kuhn, D. A. Padua, B. Leasure, and M. Wolfe (1981). DEPENDENCE GRAPHS AND COMPILER OPTIMIZATIONS.
This patch contains support for a basic DDGs containing only atomic nodes (one node for each instruction). The edges are two fold: def-use edges and memory-dependence edges. The idea behind the DependenceGraphBuilder and why we need it are summarized in https://ibm.ent.box.com/v/directed-graph-and-ddg.
The implementation takes a list of basic-blocks and only considers dependencies among instructions in those basic blocks. Any dependencies coming into or going out of instructions that do not belong to those basic blocks are ignored.
The algorithm for building the graph involves the following steps in order:
1. For each instruction in the range of basic blocks to consider, create an atomic node in the resulting graph.
2. For each node in the graph establish def-use edges to/from other nodes in the graph.
3. For each pair of nodes containing memory instruction(s) create memory edges between them. This part of the algorithm goes through the instructions in lexicographical order and creates edges in reverse order if the sink of the dependence occurs before the source of it.
Repository:
rL LLVM
https://reviews.llvm.org/D65350
Files:
llvm/include/llvm/Analysis/DDG.h
llvm/include/llvm/Analysis/DependenceGraphBuilder.h
llvm/lib/Analysis/CMakeLists.txt
llvm/lib/Analysis/DDG.cpp
llvm/lib/Analysis/DependenceGraphBuilder.cpp
llvm/lib/Passes/PassBuilder.cpp
llvm/lib/Passes/PassRegistry.def
llvm/test/Analysis/DDG/basic-a.ll
llvm/test/Analysis/DDG/basic-b.ll
llvm/test/Analysis/DDG/basic-loopnest.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65350.212005.patch
Type: text/x-patch
Size: 65683 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190726/38cc3459/attachment.bin>
More information about the llvm-commits
mailing list