[all-commits] [llvm/llvm-project] 2dd82a: [DDG] Data Dependence Graph - Topological Sort (Me...

Bardia Mahjour via All-commits all-commits at lists.llvm.org
Tue Dec 3 07:09:03 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 2dd82a1c04961cac05966f29d22a2b4b42b01b69
      https://github.com/llvm/llvm-project/commit/2dd82a1c04961cac05966f29d22a2b4b42b01b69
  Author: Bardia Mahjour <bmahjour at ca.ibm.com>
  Date:   2019-12-03 (Tue, 03 Dec 2019)

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

  Log Message:
  -----------
  [DDG] Data Dependence Graph - Topological Sort (Memory Leak Fix)

Summary:
This fixes the memory leak in bec37c3fc766a7b97f8c52c181c325fd47b75259
and re-delivers the reverted patch.
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.

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

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D70609




More information about the All-commits mailing list