[DDG] Data Dependence Graph - Pi Block
authorbmahjour <bmahjour@ca.ibm.com>
Fri, 8 Nov 2019 20:05:06 +0000 (15:05 -0500)
committerbmahjour <bmahjour@ca.ibm.com>
Fri, 8 Nov 2019 20:46:08 +0000 (15:46 -0500)
commitf0af11d86f81620096a87ffeb50267598d88e5b6
treed3590265f28d76b8339cd72b813ef41d9129b9fa
parent5df3a87224ef5843a3374a5b87e57495b3f714c4
[DDG] Data Dependence Graph - Pi Block

    Summary:
    This patch adds Pi Blocks to the DDG. A pi-block represents a group of DDG
    nodes that are part of a strongly-connected component of the graph.
    Replacing all the SCCs with pi-blocks results in an acyclic representation
    of the DDG. For example if we have:
       {a -> b}, {b -> c, d}, {c -> a}
    the cycle a -> b -> c -> a is abstracted into a pi-block "p" as follows:
       {p -> d} with "p" containing: {a -> b}, {b -> c}, {c -> a}
    In this implementation the edges between nodes that are part of the pi-block
    are preserved. The crossing edges (edges where one end of the edge is in the
    set of nodes belonging to an SCC and the other end is outside that set) are
    replaced with corresponding edges to/from the pi-block node instead.

    Authored By: bmahjour

    Reviewer: Meinersbur, fhahn, myhsu, xtian, dmgreen, kbarton, jdoerfert

    Reviewed By: Meinersbur

    Subscribers: ychen, arphaman, simoll, a.elovikov, mgorny, hiraditya, jfb, wuzish, llvm-commits, jsji, Whitney, etiotto, ppc-slack

    Tag: #llvm

    Differential Revision: https://reviews.llvm.org/D68827
llvm/include/llvm/ADT/EnumeratedArray.h [new file with mode: 0644]
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
llvm/unittests/ADT/CMakeLists.txt
llvm/unittests/ADT/EnumeratedArrayTest.cpp [new file with mode: 0644]