diff options
author | 2023-04-25 14:33:23 +0000 | |
---|---|---|
committer | 2023-04-25 16:29:00 +0000 | |
commit | b5fcab944b3786f27ab6b698685109bfc7f785fd (patch) | |
tree | 18b5cb5c332b21fc5ee5a6a982ee9d41cf41fe84 /compiler/optimizing/instruction_builder.cc | |
parent | c8507c86869c358fb0880ad49e00ca44763bfb70 (diff) |
Revert "Don't enable intrinsic optimizations in debuggable runtime"
This reverts commit cb008914fbc5a2334e3c00366afdb5f8af5a23ba.
Reason for revert: Failures on some configs
https://buganizer.corp.google.com/issues/279562617
Change-Id: I4d26cd00e76d8ec4aef76ab26987418eab24d217
Diffstat (limited to 'compiler/optimizing/instruction_builder.cc')
-rw-r--r-- | compiler/optimizing/instruction_builder.cc | 35 |
1 files changed, 9 insertions, 26 deletions
diff --git a/compiler/optimizing/instruction_builder.cc b/compiler/optimizing/instruction_builder.cc index fee9091145..f9a513804c 100644 --- a/compiler/optimizing/instruction_builder.cc +++ b/compiler/optimizing/instruction_builder.cc @@ -469,9 +469,6 @@ void HInstructionBuilder::BuildIntrinsic(ArtMethod* method) { current_block_ = graph_->GetEntryBlock(); InitializeBlockLocals(); InitializeParameters(); - if (graph_->IsDebuggable() && code_generator_->GetCompilerOptions().IsJitCompiler()) { - AppendInstruction(new (allocator_) HMethodEntryHook(0u)); - } AppendInstruction(new (allocator_) HGoto(0u)); // Fill the body. @@ -507,21 +504,14 @@ void HInstructionBuilder::BuildIntrinsic(ArtMethod* method) { dispatch_info, invoke_type, target_method, - HInvokeStaticOrDirect::ClinitCheckRequirement::kNone, - !graph_->IsDebuggable()); + HInvokeStaticOrDirect::ClinitCheckRequirement::kNone); HandleInvoke(invoke, operands, shorty, /* is_unresolved= */ false); } // Add the return instruction. if (return_type_ == DataType::Type::kVoid) { - if (graph_->IsDebuggable() && code_generator_->GetCompilerOptions().IsJitCompiler()) { - AppendInstruction(new (allocator_) HMethodExitHook(graph_->GetNullConstant(), kNoDexPc)); - } AppendInstruction(new (allocator_) HReturnVoid()); } else { - if (graph_->IsDebuggable() && code_generator_->GetCompilerOptions().IsJitCompiler()) { - AppendInstruction(new (allocator_) HMethodExitHook(latest_result_, kNoDexPc)); - } AppendInstruction(new (allocator_) HReturn(latest_result_)); } @@ -1060,8 +1050,7 @@ bool HInstructionBuilder::BuildInvoke(const Instruction& instruction, dispatch_info, invoke_type, resolved_method_reference, - HInvokeStaticOrDirect::ClinitCheckRequirement::kImplicit, - !graph_->IsDebuggable()); + HInvokeStaticOrDirect::ClinitCheckRequirement::kImplicit); return HandleStringInit(invoke, operands, shorty); } @@ -1074,7 +1063,7 @@ bool HInstructionBuilder::BuildInvoke(const Instruction& instruction, } // Try to build an HIR replacement for the intrinsic. - if (UNLIKELY(resolved_method->IsIntrinsic()) && !graph_->IsDebuggable()) { + if (UNLIKELY(resolved_method->IsIntrinsic())) { // All intrinsics are in the primary boot image, so their class can always be referenced // and we do not need to rely on the implicit class initialization check. The class should // be initialized but we do not require that here. @@ -1125,8 +1114,7 @@ bool HInstructionBuilder::BuildInvoke(const Instruction& instruction, dispatch_info, invoke_type, resolved_method_reference, - clinit_check_requirement, - !graph_->IsDebuggable()); + clinit_check_requirement); if (clinit_check != nullptr) { // Add the class initialization check as last input of `invoke`. DCHECK_EQ(clinit_check_requirement, HInvokeStaticOrDirect::ClinitCheckRequirement::kExplicit); @@ -1142,8 +1130,7 @@ bool HInstructionBuilder::BuildInvoke(const Instruction& instruction, method_reference, resolved_method, resolved_method_reference, - /*vtable_index=*/ imt_or_vtable_index, - !graph_->IsDebuggable()); + /*vtable_index=*/ imt_or_vtable_index); } else { DCHECK_EQ(invoke_type, kInterface); if (kIsDebugBuild) { @@ -1164,8 +1151,7 @@ bool HInstructionBuilder::BuildInvoke(const Instruction& instruction, resolved_method, resolved_method_reference, /*imt_index=*/ imt_or_vtable_index, - load_kind, - !graph_->IsDebuggable()); + load_kind); } return HandleInvoke(invoke, operands, shorty, /* is_unresolved= */ false); } @@ -1364,14 +1350,12 @@ bool HInstructionBuilder::BuildInvokePolymorphic(uint32_t dex_pc, method_reference, resolved_method, resolved_method_reference, - proto_idx, - !graph_->IsDebuggable()); + proto_idx); if (!HandleInvoke(invoke, operands, shorty, /* is_unresolved= */ false)) { return false; } - if (invoke->GetIntrinsic() != Intrinsics::kNone && - invoke->GetIntrinsic() != Intrinsics::kMethodHandleInvoke && + if (invoke->GetIntrinsic() != Intrinsics::kMethodHandleInvoke && invoke->GetIntrinsic() != Intrinsics::kMethodHandleInvokeExact && VarHandleAccessorNeedsReturnTypeCheck(invoke, return_type)) { // Type check is needed because VarHandle intrinsics do not type check the retrieved reference. @@ -1404,8 +1388,7 @@ bool HInstructionBuilder::BuildInvokeCustom(uint32_t dex_pc, call_site_idx, return_type, dex_pc, - method_reference, - !graph_->IsDebuggable()); + method_reference); return HandleInvoke(invoke, operands, shorty, /* is_unresolved= */ false); } |