summaryrefslogtreecommitdiff
path: root/compiler/optimizing/optimizing_compiler.cc
diff options
context:
space:
mode:
author David Brazdil <dbrazdil@google.com> 2016-02-05 15:47:16 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2016-02-05 15:47:16 +0000
commit11aa3f5c5efd5ce8e761dfd76378a91d9f8dc42b (patch)
tree746ab81bbc05e03fb918ca32cc8d5b296d083113 /compiler/optimizing/optimizing_compiler.cc
parent7ac9aeb501520089334c7b9e0deca1e089945bc8 (diff)
parentbd89a5c556324062b7d841843b039392e84cfaf4 (diff)
Merge "Revert "Implement on-stack replacement for arm/arm64/x86/x86_64.""
Diffstat (limited to 'compiler/optimizing/optimizing_compiler.cc')
-rw-r--r--compiler/optimizing/optimizing_compiler.cc42
1 files changed, 14 insertions, 28 deletions
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc
index 736ac32011..bdc664b3eb 100644
--- a/compiler/optimizing/optimizing_compiler.cc
+++ b/compiler/optimizing/optimizing_compiler.cc
@@ -300,7 +300,7 @@ class OptimizingCompiler FINAL : public Compiler {
}
}
- bool JitCompile(Thread* self, jit::JitCodeCache* code_cache, ArtMethod* method, bool osr)
+ bool JitCompile(Thread* self, jit::JitCodeCache* code_cache, ArtMethod* method)
OVERRIDE
SHARED_REQUIRES(Locks::mutator_lock_);
@@ -309,8 +309,7 @@ class OptimizingCompiler FINAL : public Compiler {
CompiledMethod* Emit(ArenaAllocator* arena,
CodeVectorAllocator* code_allocator,
CodeGenerator* codegen,
- CompilerDriver* driver,
- const DexFile::CodeItem* item) const;
+ CompilerDriver* driver) const;
// Try compiling a method and return the code generator used for
// compiling it.
@@ -328,8 +327,7 @@ class OptimizingCompiler FINAL : public Compiler {
uint32_t method_idx,
jobject class_loader,
const DexFile& dex_file,
- Handle<mirror::DexCache> dex_cache,
- bool osr) const;
+ Handle<mirror::DexCache> dex_cache) const;
std::unique_ptr<OptimizingCompilerStats> compilation_stats_;
@@ -582,12 +580,11 @@ static ArenaVector<LinkerPatch> EmitAndSortLinkerPatches(CodeGenerator* codegen)
CompiledMethod* OptimizingCompiler::Emit(ArenaAllocator* arena,
CodeVectorAllocator* code_allocator,
CodeGenerator* codegen,
- CompilerDriver* compiler_driver,
- const DexFile::CodeItem* code_item) const {
+ CompilerDriver* compiler_driver) const {
ArenaVector<LinkerPatch> linker_patches = EmitAndSortLinkerPatches(codegen);
ArenaVector<uint8_t> stack_map(arena->Adapter(kArenaAllocStackMaps));
stack_map.resize(codegen->ComputeStackMapsSize());
- codegen->BuildStackMaps(MemoryRegion(stack_map.data(), stack_map.size()), *code_item);
+ codegen->BuildStackMaps(MemoryRegion(stack_map.data(), stack_map.size()));
CompiledMethod* compiled_method = CompiledMethod::SwapAllocCompiledMethod(
compiler_driver,
@@ -618,8 +615,7 @@ CodeGenerator* OptimizingCompiler::TryCompile(ArenaAllocator* arena,
uint32_t method_idx,
jobject class_loader,
const DexFile& dex_file,
- Handle<mirror::DexCache> dex_cache,
- bool osr) const {
+ Handle<mirror::DexCache> dex_cache) const {
MaybeRecordStat(MethodCompilationStat::kAttemptCompilation);
CompilerDriver* compiler_driver = GetCompilerDriver();
InstructionSet instruction_set = compiler_driver->GetInstructionSet();
@@ -667,14 +663,8 @@ CodeGenerator* OptimizingCompiler::TryCompile(ArenaAllocator* arena,
dex_compilation_unit.GetDexFile(),
dex_compilation_unit.GetClassDefIndex());
HGraph* graph = new (arena) HGraph(
- arena,
- dex_file,
- method_idx,
- requires_barrier,
- compiler_driver->GetInstructionSet(),
- kInvalidInvokeType,
- compiler_driver->GetCompilerOptions().GetDebuggable(),
- osr);
+ arena, dex_file, method_idx, requires_barrier, compiler_driver->GetInstructionSet(),
+ kInvalidInvokeType, compiler_driver->GetCompilerOptions().GetDebuggable());
std::unique_ptr<CodeGenerator> codegen(
CodeGenerator::Create(graph,
@@ -807,11 +797,10 @@ CompiledMethod* OptimizingCompiler::Compile(const DexFile::CodeItem* code_item,
method_idx,
jclass_loader,
dex_file,
- dex_cache,
- /* osr */ false));
+ dex_cache));
if (codegen.get() != nullptr) {
MaybeRecordStat(MethodCompilationStat::kCompiled);
- method = Emit(&arena, &code_allocator, codegen.get(), compiler_driver, code_item);
+ method = Emit(&arena, &code_allocator, codegen.get(), compiler_driver);
}
} else {
if (compiler_driver->GetCompilerOptions().VerifyAtRuntime()) {
@@ -854,8 +843,7 @@ bool IsCompilingWithCoreImage() {
bool OptimizingCompiler::JitCompile(Thread* self,
jit::JitCodeCache* code_cache,
- ArtMethod* method,
- bool osr) {
+ ArtMethod* method) {
StackHandleScope<2> hs(self);
Handle<mirror::ClassLoader> class_loader(hs.NewHandle(
method->GetDeclaringClass()->GetClassLoader()));
@@ -885,8 +873,7 @@ bool OptimizingCompiler::JitCompile(Thread* self,
method_idx,
jclass_loader,
*dex_file,
- dex_cache,
- osr));
+ dex_cache));
if (codegen.get() == nullptr) {
return false;
}
@@ -898,7 +885,7 @@ bool OptimizingCompiler::JitCompile(Thread* self,
return false;
}
MaybeRecordStat(MethodCompilationStat::kCompiled);
- codegen->BuildStackMaps(MemoryRegion(stack_map_data, stack_map_size), *code_item);
+ codegen->BuildStackMaps(MemoryRegion(stack_map_data, stack_map_size));
const void* code = code_cache->CommitCode(
self,
method,
@@ -909,8 +896,7 @@ bool OptimizingCompiler::JitCompile(Thread* self,
codegen->GetCoreSpillMask(),
codegen->GetFpuSpillMask(),
code_allocator.GetMemory().data(),
- code_allocator.GetSize(),
- osr);
+ code_allocator.GetSize());
if (code == nullptr) {
code_cache->ClearData(self, stack_map_data);