Index: lib/Analysis/ScopGraphPrinter.cpp =================================================================== --- lib/Analysis/ScopGraphPrinter.cpp +++ lib/Analysis/ScopGraphPrinter.cpp @@ -69,11 +69,9 @@ BasicBlock *BB = Node->getNodeAs(); if (isSimple()) - return DOTGraphTraits::getSimpleNodeLabel( - BB, BB->getParent()); + return DOTGraphTraits::getSimpleNodeLabel(BB, nullptr); else - return DOTGraphTraits::getCompleteNodeLabel( - BB, BB->getParent()); + return DOTGraphTraits::getCompleteNodeLabel(BB, nullptr); } return "Not implemented"; Index: lib/Support/RegisterPasses.cpp =================================================================== --- lib/Support/RegisterPasses.cpp +++ lib/Support/RegisterPasses.cpp @@ -514,9 +514,6 @@ assert(!DumpAfter && "This option is not implemented"); assert(DumpAfterFile.empty() && "This option is not implemented"); - - if (CFGPrinter) - PM.addPass(llvm::CFGPrinterPass()); } /// Register Polly to be available as an optimizer @@ -690,6 +687,9 @@ if (VerifyEachPass) MPM.addPass(VerifierPass()); + if (CFGPrinter) + MPM.addPass(llvm::CFGPrinterPass()); + return true; }