summaryrefslogtreecommitdiff
path: root/compiler/optimizing/optimizing_compiler.cc
diff options
context:
space:
mode:
author Calin Juravle <calin@google.com> 2015-05-19 14:57:08 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2015-05-19 14:57:09 +0000
commitdc23a3882b82a7a3dd5078cda3f4b4706e172617 (patch)
treeeb8e4774c3b5bc5221a572595377cd5bcaaa75f9 /compiler/optimizing/optimizing_compiler.cc
parent9652135e5c23767098d7c7960f9d7d06f7951f10 (diff)
parent3cd4fc8bbb40a57d2ffde85f543c124f53237c1d (diff)
Merge "Eliminate redundant constructor barriers when inlining."
Diffstat (limited to 'compiler/optimizing/optimizing_compiler.cc')
-rw-r--r--compiler/optimizing/optimizing_compiler.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc
index 8bb5d8ebae..be9a42425b 100644
--- a/compiler/optimizing/optimizing_compiler.cc
+++ b/compiler/optimizing/optimizing_compiler.cc
@@ -512,9 +512,14 @@ CompiledMethod* OptimizingCompiler::TryCompile(const DexFile::CodeItem* code_ite
class_def_idx, method_idx, access_flags,
compiler_driver->GetVerifiedMethod(&dex_file, method_idx));
+ bool requires_barrier = dex_compilation_unit.IsConstructor()
+ && compiler_driver->RequiresConstructorBarrier(Thread::Current(),
+ dex_compilation_unit.GetDexFile(),
+ dex_compilation_unit.GetClassDefIndex());
ArenaAllocator arena(Runtime::Current()->GetArenaPool());
HGraph* graph = new (&arena) HGraph(
- &arena, dex_file, method_idx, compiler_driver->GetCompilerOptions().GetDebuggable());
+ &arena, dex_file, method_idx, requires_barrier,
+ compiler_driver->GetCompilerOptions().GetDebuggable());
// For testing purposes, we put a special marker on method names that should be compiled
// with this compiler. This makes sure we're not regressing.