OSDN Git Service

[GraphDiff] Make InverseGraph a property of a GraphDiff.
authorAlina Sbirlea <asbirlea@google.com>
Tue, 14 Aug 2018 17:43:24 +0000 (17:43 +0000)
committerAlina Sbirlea <asbirlea@google.com>
Tue, 14 Aug 2018 17:43:24 +0000 (17:43 +0000)
commite747ac6d9aaaf2d02c3d0a6772285737ea4f08a3
tree2ffab46e0944c9009bced543d3f0605a6ed3ac90
parenta06c0f8edb710e606f914e4e4fe22cd30b5ff5fb
[GraphDiff] Make InverseGraph a property of a GraphDiff.

Summary:
Treating a graph in reverse is a property of the GraphDiff and should instead be a template argument, just like IsPostDom is one for DomTrees.
If it's just an argument to all methods, we could have mismatches between the constructor of the GraphDiff which may reverse the updates when filtering them, and the calls retrieving the filtered delete/insert updates.
Also, since this will be used in IDF, where we're using a DomTree, this creates a cleaner interface for the GraphTraits to use the existing template argument of DomTreeBase.

Separate patch from the one adding GraphDiff, so get a clear diff of what changed.

Reviewers: timshen, kuhar

Subscribers: sanjoy, llvm-commits, jlebar

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339699 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/CFGDiff.h