aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Scalar/GVNPRE.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/GVNPRE.cpp b/lib/Transforms/Scalar/GVNPRE.cpp
index 6a36ea3d01..c43603e6dd 100644
--- a/lib/Transforms/Scalar/GVNPRE.cpp
+++ b/lib/Transforms/Scalar/GVNPRE.cpp
@@ -526,6 +526,9 @@ bool GVNPRE::runOnFunction(Function &F) {
df_begin(PDT.getRootNode()), E = df_end(PDT.getRootNode());
PDI != E; ++PDI) {
BasicBlock* BB = PDI->getBlock();
+ if (BB == 0)
+ continue;
+
DOUT << "Block: " << BB->getName() << "\n";
DOUT << "TMP_GEN: ";
dump(generatedTemporaries[BB]);
@@ -635,6 +638,9 @@ bool GVNPRE::runOnFunction(Function &F) {
E = df_end(DT.getRootNode()); DI != E; ++DI) {
BasicBlock* BB = DI->getBlock();
+ if (BB == 0)
+ continue;
+
std::set<Value*, ExprLT>& new_set = new_sets[BB];
std::set<Value*, ExprLT>& availOut = availableOut[BB];
std::set<Value*, ExprLT>& anticIn = anticipatedIn[BB];