summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rw-r--r--compiler/common_compiler_test.cc11
-rw-r--r--compiler/common_compiler_test.h5
-rw-r--r--compiler/compiler.cc15
-rw-r--r--compiler/compiler.h8
-rw-r--r--compiler/jit/jit_compiler.cc3
5 files changed, 5 insertions, 37 deletions
diff --git a/compiler/common_compiler_test.cc b/compiler/common_compiler_test.cc
index d2cf3aef3c..8c05888215 100644
--- a/compiler/common_compiler_test.cc
+++ b/compiler/common_compiler_test.cc
@@ -255,14 +255,6 @@ void CommonCompilerTestImpl::SetUpRuntimeOptionsImpl() {
ApplyInstructionSet();
}
-Compiler::Kind CommonCompilerTestImpl::GetCompilerKind() const {
- return compiler_kind_;
-}
-
-void CommonCompilerTestImpl::SetCompilerKind(Compiler::Kind compiler_kind) {
- compiler_kind_ = compiler_kind;
-}
-
void CommonCompilerTestImpl::TearDown() {
code_and_metadata_.clear();
compiler_options_.reset();
@@ -278,8 +270,7 @@ void CommonCompilerTestImpl::CompileMethod(ArtMethod* method) {
DCHECK(!Runtime::Current()->IsStarted());
Thread* self = Thread::Current();
StackHandleScope<2> hs(self);
- std::unique_ptr<Compiler> compiler(
- Compiler::Create(*compiler_options_, &storage, compiler_kind_));
+ std::unique_ptr<Compiler> compiler(Compiler::Create(*compiler_options_, &storage));
const DexFile& dex_file = *method->GetDexFile();
Handle<mirror::DexCache> dex_cache =
hs.NewHandle(GetClassLinker()->FindDexCache(self, dex_file));
diff --git a/compiler/common_compiler_test.h b/compiler/common_compiler_test.h
index 9b49c93ea6..2a1c2d21f1 100644
--- a/compiler/common_compiler_test.h
+++ b/compiler/common_compiler_test.h
@@ -60,9 +60,6 @@ class EXPORT CommonCompilerTestImpl {
void SetUpRuntimeOptionsImpl();
- Compiler::Kind GetCompilerKind() const;
- void SetCompilerKind(Compiler::Kind compiler_kind);
-
virtual CompilerFilter::Filter GetCompilerFilter() const {
return CompilerFilter::kDefaultCompilerFilter;
}
@@ -76,8 +73,6 @@ class EXPORT CommonCompilerTestImpl {
void ClearBootImageOption();
- Compiler::Kind compiler_kind_ = Compiler::kOptimizing;
-
InstructionSet instruction_set_ =
(kRuntimeISA == InstructionSet::kArm) ? InstructionSet::kThumb2 : kRuntimeISA;
// Take the default set of instruction features from the build.
diff --git a/compiler/compiler.cc b/compiler/compiler.cc
index 0e040ac54a..9cbd65d89d 100644
--- a/compiler/compiler.cc
+++ b/compiler/compiler.cc
@@ -27,22 +27,11 @@
namespace art HIDDEN {
-Compiler* Compiler::Create(const CompilerOptions& compiler_options,
- CompiledCodeStorage* storage,
- Compiler::Kind kind) {
+Compiler* Compiler::Create(const CompilerOptions& compiler_options, CompiledCodeStorage* storage) {
// Check that oat version when runtime was compiled matches the oat version of the compiler.
constexpr std::array<uint8_t, 4> compiler_oat_version = OatHeader::kOatVersion;
OatHeader::CheckOatVersion(compiler_oat_version);
- switch (kind) {
- case kQuick:
- // TODO: Remove Quick in options.
- case kOptimizing:
- return CreateOptimizingCompiler(compiler_options, storage);
-
- default:
- LOG(FATAL) << "UNREACHABLE";
- UNREACHABLE();
- }
+ return CreateOptimizingCompiler(compiler_options, storage);
}
bool Compiler::IsPathologicalCase(const dex::CodeItem& code_item,
diff --git a/compiler/compiler.h b/compiler/compiler.h
index 6c317f7e02..843bbbb083 100644
--- a/compiler/compiler.h
+++ b/compiler/compiler.h
@@ -48,14 +48,8 @@ class Thread;
class Compiler {
public:
- enum Kind {
- kQuick,
- kOptimizing
- };
-
EXPORT static Compiler* Create(const CompilerOptions& compiler_options,
- CompiledCodeStorage* storage,
- Kind kind);
+ CompiledCodeStorage* storage);
virtual bool CanCompileMethod(uint32_t method_idx, const DexFile& dex_file) const = 0;
diff --git a/compiler/jit/jit_compiler.cc b/compiler/jit/jit_compiler.cc
index c14d5d37e8..051368cc8a 100644
--- a/compiler/jit/jit_compiler.cc
+++ b/compiler/jit/jit_compiler.cc
@@ -165,8 +165,7 @@ std::vector<uint8_t> JitCompiler::PackElfFileForJIT(ArrayRef<const JITCodeEntry*
JitCompiler::JitCompiler() {
compiler_options_.reset(new CompilerOptions());
ParseCompilerOptions();
- compiler_.reset(
- Compiler::Create(*compiler_options_, /*storage=*/ nullptr, Compiler::kOptimizing));
+ compiler_.reset(Compiler::Create(*compiler_options_, /*storage=*/ nullptr));
}
JitCompiler::~JitCompiler() {