diff options
| author | 2016-02-05 15:46:42 +0000 | |
|---|---|---|
| committer | 2016-02-05 15:46:42 +0000 | |
| commit | bd89a5c556324062b7d841843b039392e84cfaf4 (patch) | |
| tree | 185a1604d29d715aa3ac8e0284343bf8d538ef3e /compiler/optimizing/optimizing_compiler.cc | |
| parent | 891bc286963892ed96134ca1adb7822737af9710 (diff) | |
Revert "Implement on-stack replacement for arm/arm64/x86/x86_64."
DCHECK whether loop headers are covered fails.
This reverts commit 891bc286963892ed96134ca1adb7822737af9710.
Change-Id: I0f9a90630b014b16d20ba1dfba31ce63e6648021
Diffstat (limited to 'compiler/optimizing/optimizing_compiler.cc')
| -rw-r--r-- | compiler/optimizing/optimizing_compiler.cc | 42 |
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); |