diff options
author | 2023-08-23 16:49:44 +0000 | |
---|---|---|
committer | 2023-08-25 14:59:48 +0000 | |
commit | 2ccac33c87791e5a4117ab935c74f96f1369a9cc (patch) | |
tree | 09a60347c5a8ce16a2ad89553efc9ab67476b14f /compiler/optimizing | |
parent | c752107963a4e504a334baaaba556465e9b89bef (diff) |
Enable intrinsic optimization for polymorphic intrinsics
Polymorphic invokes are expensive and some of the methods in Atomic*
classes uses polymorphic methods. We use intrinsics to generate
efficient code for them. Intrinsic optimization was disabled in
debuggable runtimes to be able to support breakpoint in intrinsic
functions. It might be less useful to break in such methods so we want
to enable intrinsic optimization for polymorphic invokes which are
performance sensitive.
Bug: 296298460
Test: art/test.py
Change-Id: I575695d82e8bc7d703cfbf5ff22ea7d5a35f6937
Diffstat (limited to 'compiler/optimizing')
-rw-r--r-- | compiler/optimizing/instruction_builder.cc | 3 | ||||
-rw-r--r-- | compiler/optimizing/nodes.h | 8 |
2 files changed, 4 insertions, 7 deletions
diff --git a/compiler/optimizing/instruction_builder.cc b/compiler/optimizing/instruction_builder.cc index 2576b02c9f..fd599f789e 100644 --- a/compiler/optimizing/instruction_builder.cc +++ b/compiler/optimizing/instruction_builder.cc @@ -1364,8 +1364,7 @@ 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; } diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h index 9f085acdb3..b173764f2f 100644 --- a/compiler/optimizing/nodes.h +++ b/compiler/optimizing/nodes.h @@ -4871,8 +4871,7 @@ class HInvokePolymorphic final : public HInvoke { // to pass intrinsic information to the HInvokePolymorphic node. ArtMethod* resolved_method, MethodReference resolved_method_reference, - dex::ProtoIndex proto_idx, - bool enable_intrinsic_opt) + dex::ProtoIndex proto_idx) : HInvoke(kInvokePolymorphic, allocator, number_of_arguments, @@ -4883,9 +4882,8 @@ class HInvokePolymorphic final : public HInvoke { resolved_method, resolved_method_reference, kPolymorphic, - enable_intrinsic_opt), - proto_idx_(proto_idx) { - } + /* enable_intrinsic_opt= */ true), + proto_idx_(proto_idx) {} bool IsClonable() const override { return true; } |