MemoryDepAnalysis is not used if redundant load processing is disabled.
authorEvan Cheng <evan.cheng@apple.com>
Mon, 1 Mar 2010 22:23:12 +0000 (22:23 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Mon, 1 Mar 2010 22:23:12 +0000 (22:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97512 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/GVN.cpp

index f7470c3c19ee2b16a890a54176221a95dbb626cb..a7cc9049cdd15a4f5e9c2df386ccf1cba7608f10 100644 (file)
@@ -2237,7 +2237,7 @@ bool GVN::splitCriticalEdges() {
     std::pair<TerminatorInst*, unsigned> Edge = toSplit.pop_back_val();
     SplitCriticalEdge(Edge.first, Edge.second, this);
   } while (!toSplit.empty());
-  MD->invalidateCachedPredecessors();
+  if (MD) MD->invalidateCachedPredecessors();
   return true;
 }