diff options
| author | Nicolas Geoffray <ngeoffray@google.com> | 2017-11-10 16:46:43 +0000 |
|---|---|---|
| committer | Nicolas Geoffray <ngeoffray@google.com> | 2017-11-10 16:48:55 +0000 |
| commit | 62a2f27f02e23c28bf010ca22bfd28b36a69c8f2 (patch) | |
| tree | 7a64ae9a28dcfc3c0eb37a8e582b530b392bf180 | |
| parent | a051f29bbbb7f237242e84294b8f2ced5f4b1acc (diff) | |
| download | art-62a2f27f02e23c28bf010ca22bfd28b36a69c8f2.tar.gz art-62a2f27f02e23c28bf010ca22bfd28b36a69c8f2.tar.bz2 art-62a2f27f02e23c28bf010ca22bfd28b36a69c8f2.zip | |
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
| -rw-r--r-- | compiler/jit/jit_compiler.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/jit/jit_compiler.cc b/compiler/jit/jit_compiler.cc index 5c89869e00..0c82d601a7 100644 --- a/compiler/jit/jit_compiler.cc +++ b/compiler/jit/jit_compiler.cc @@ -80,6 +80,9 @@ extern "C" void jit_types_loaded(void* handle, mirror::Class** types, size_t cou 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 @@ JitCompiler::JitCompiler() { // 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; |
