Fall back to Quick when Optimizing cannot compile.

Currently applies when seeing unresolved types/methods/fields,
and methods with try/catch.

Change-Id: I93b12d440b39f0b9faf98f08f2bfddedfeff7182
diff --git a/compiler/dex/mir_graph.cc b/compiler/dex/mir_graph.cc
index f354a49..3103f96 100644
--- a/compiler/dex/mir_graph.cc
+++ b/compiler/dex/mir_graph.cc
@@ -2459,11 +2459,9 @@
   return res;
 }
 
-void MIRGraph::CalculateBasicBlockInformation() {
-  auto* quick_compiler = down_cast<QuickCompiler*>(cu_->compiler_driver->GetCompiler());
-  DCHECK(quick_compiler != nullptr);
+void MIRGraph::CalculateBasicBlockInformation(const PassManager* const post_opt_pass_manager) {
   /* Create the pass driver and launch it */
-  PassDriverMEPostOpt driver(quick_compiler->GetPostOptPassManager(), cu_);
+  PassDriverMEPostOpt driver(post_opt_pass_manager, cu_);
   driver.Launch();
 }