OSDN Git Service

[MemorySSA] Use GraphDiff info when computing IDF.
authorAlina Sbirlea <asbirlea@google.com>
Wed, 19 Jun 2019 21:17:31 +0000 (21:17 +0000)
committerAlina Sbirlea <asbirlea@google.com>
Wed, 19 Jun 2019 21:17:31 +0000 (21:17 +0000)
Summary:
When computing IDF for insert updates, ensure we use the snapshot CFG offered by GraphDiff.
Caught by D63389.

Reviewers: kuhar, george.burgess.iv

Subscribers: jlebar, Prazek, llvm-commits, Szelethus

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363879 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/MemorySSAUpdater.cpp

index 0258893..b2ae264 100644 (file)
@@ -963,7 +963,7 @@ void MemorySSAUpdater::applyInsertUpdates(ArrayRef<CFGUpdate> Updates,
   // Compute IDF and add Phis in all IDF blocks that do not have one.
   SmallVector<BasicBlock *, 32> IDFBlocks;
   if (!BlocksToProcess.empty()) {
-    ForwardIDFCalculator IDFs(DT);
+    ForwardIDFCalculator IDFs(DT, GD);
     SmallPtrSet<BasicBlock *, 16> DefiningBlocks(BlocksToProcess.begin(),
                                                  BlocksToProcess.end());
     IDFs.setDefiningBlocks(DefiningBlocks);