summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2017-11-13 09:25:05 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2017-11-13 09:25:05 +0000
commitdd7f2a2436997097e194fd16662941f97278e58d (patch)
tree8a1bd95c6d43e7acfd8ea5d27a58494bcdf28412
parent051f31e9baffffac889135f20b2b3ad517d8e1ae (diff)
parent62a2f27f02e23c28bf010ca22bfd28b36a69c8f2 (diff)
Merge "Move code around to fix --inline-max-code-units in JIT."
-rw-r--r--compiler/jit/jit_compiler.cc7
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;