summaryrefslogtreecommitdiff
path: root/compiler/optimizing/optimizing_compiler.cc
diff options
context:
space:
mode:
author David Sehr <sehr@google.com> 2017-04-24 08:59:08 -0700
committer David Sehr <sehr@google.com> 2017-04-24 13:10:34 -0700
commited6ca100173a497081226fc63f0d24ee3c5c6b81 (patch)
tree429b3f41458014eb230f41c46d5c4274586b6d6e /compiler/optimizing/optimizing_compiler.cc
parentacf8c9e0b0ac05d1a0619782e140139324bae2f9 (diff)
parent22665d13ac44a17789a3d4d454ff406b81aa3a6c (diff)
Merge internal master oc-dev
Fixes for O release, including CC code size issue, JVMTI, ART vectorization, the borg scanner, secondary dex files, and others. Bug: 29516974 Bug: 30126666 Bug: 36141117 Bug: 30773047 Bug: 30933338 Test: make -j 40 test-art-host; art/test.py -j 8 --target Change-Id: I77ea4e19dfa45bdf843f16f74154bf8655c258d8
Diffstat (limited to 'compiler/optimizing/optimizing_compiler.cc')
-rw-r--r--compiler/optimizing/optimizing_compiler.cc30
1 files changed, 3 insertions, 27 deletions
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc
index 3c6d2d64a9..8aad539851 100644
--- a/compiler/optimizing/optimizing_compiler.cc
+++ b/compiler/optimizing/optimizing_compiler.cc
@@ -449,15 +449,6 @@ static bool IsInstructionSetSupported(InstructionSet instruction_set) {
|| instruction_set == kX86_64;
}
-// Read barrier are supported on ARM, ARM64, x86 and x86-64 at the moment.
-// TODO: Add support for other architectures and remove this function
-static bool InstructionSetSupportsReadBarrier(InstructionSet instruction_set) {
- return instruction_set == kArm64
- || instruction_set == kThumb2
- || instruction_set == kX86
- || instruction_set == kX86_64;
-}
-
// Strip pass name suffix to get optimization name.
static std::string ConvertPassNameToOptimizationName(const std::string& pass_name) {
size_t pos = pass_name.find(kPassNameSeparator);
@@ -912,12 +903,6 @@ CodeGenerator* OptimizingCompiler::TryCompile(ArenaAllocator* arena,
return nullptr;
}
- // When read barriers are enabled, do not attempt to compile for
- // instruction sets that have no read barrier support.
- if (kEmitCompilerReadBarrier && !InstructionSetSupportsReadBarrier(instruction_set)) {
- return nullptr;
- }
-
if (Compiler::IsPathologicalCase(*code_item, method_idx, dex_file)) {
MaybeRecordStat(MethodCompilationStat::kNotCompiledPathological);
return nullptr;
@@ -945,16 +930,10 @@ CodeGenerator* OptimizingCompiler::TryCompile(ArenaAllocator* arena,
/* verified_method */ nullptr,
dex_cache);
- bool requires_barrier = dex_compilation_unit.IsConstructor()
- && compiler_driver->RequiresConstructorBarrier(Thread::Current(),
- 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(),
@@ -1108,13 +1087,10 @@ CompiledMethod* OptimizingCompiler::Compile(const DexFile::CodeItem* code_item,
if (kIsDebugBuild &&
IsCompilingWithCoreImage() &&
- IsInstructionSetSupported(compiler_driver->GetInstructionSet()) &&
- (!kEmitCompilerReadBarrier ||
- InstructionSetSupportsReadBarrier(compiler_driver->GetInstructionSet()))) {
+ IsInstructionSetSupported(compiler_driver->GetInstructionSet())) {
// For testing purposes, we put a special marker on method names
- // that should be compiled with this compiler (when the the
- // instruction set is supported -- and has support for read
- // barriers, if they are enabled). This makes sure we're not
+ // that should be compiled with this compiler (when the
+ // instruction set is supported). This makes sure we're not
// regressing.
std::string method_name = dex_file.PrettyMethod(method_idx);
bool shouldCompile = method_name.find("$opt$") != std::string::npos;