Move code around to fix --inline-max-code-units in JIT.

Test: set --inline-max-code-units=0 and --verbose:compiler,
and see all inlining attempts abort.

bug: 65622511
Change-Id: I11a512cc690a8db3a092962b618d96f64cffd264
diff --git a/compiler/jit/jit_compiler.cc b/compiler/jit/jit_compiler.cc
index 5c89869..0c82d60 100644
--- a/compiler/jit/jit_compiler.cc
+++ b/compiler/jit/jit_compiler.cc
@@ -80,6 +80,9 @@
 
 JitCompiler::JitCompiler() {
   compiler_options_.reset(new CompilerOptions());
+  // Special case max code units for inlining, whose default is "unset" (implictly
+  // meaning no limit). Do this before parsing the actuall passed options.
+  compiler_options_->SetInlineMaxCodeUnits(CompilerOptions::kDefaultInlineMaxCodeUnits);
   {
     std::string error_msg;
     if (!compiler_options_->ParseCompilerOptions(Runtime::Current()->GetCompilerOptions(),
@@ -95,10 +98,6 @@
   // Set debuggability based on the runtime value.
   compiler_options_->SetDebuggable(Runtime::Current()->IsJavaDebuggable());
 
-  // Special case max code units for inlining, whose default is "unset" (implictly
-  // meaning no limit).
-  compiler_options_->SetInlineMaxCodeUnits(CompilerOptions::kDefaultInlineMaxCodeUnits);
-
   const InstructionSet instruction_set = kRuntimeISA;
   for (const StringPiece option : Runtime::Current()->GetCompilerOptions()) {
     VLOG(compiler) << "JIT compiler option " << option;