From: Evan Cheng Date: Mon, 1 Mar 2010 22:23:12 +0000 (+0000) Subject: MemoryDepAnalysis is not used if redundant load processing is disabled. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=19d417c346d5f49d86fe447cc58d931a1b476d8e;p=oota-llvm.git MemoryDepAnalysis is not used if redundant load processing is disabled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97512 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/GVN.cpp b/lib/Transforms/Scalar/GVN.cpp index f7470c3c19e..a7cc9049cdd 100644 --- a/lib/Transforms/Scalar/GVN.cpp +++ b/lib/Transforms/Scalar/GVN.cpp @@ -2237,7 +2237,7 @@ bool GVN::splitCriticalEdges() { std::pair Edge = toSplit.pop_back_val(); SplitCriticalEdge(Edge.first, Edge.second, this); } while (!toSplit.empty()); - MD->invalidateCachedPredecessors(); + if (MD) MD->invalidateCachedPredecessors(); return true; }