From e82d04b37415974cfd85be881f50656610890daf Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Mon, 17 Feb 2025 08:55:37 +0000 Subject: Optimizing: Speed up `HInstruction::Add{,Env}UseAt()`. Avoid three dependent loads to fetch the allocator on the hot paths. Inline the `FixupUserRecordsAfter*UseInsertion()` loop and use the fact that it's known to execute exactly one or two iterations. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Bug: 181943478 Change-Id: I7fd4d48caebc6aeb13fb9a9f8146a06129c72b2e --- compiler/optimizing/instruction_builder.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/optimizing/instruction_builder.cc') diff --git a/compiler/optimizing/instruction_builder.cc b/compiler/optimizing/instruction_builder.cc index 1f2628c8ec..74880463c3 100644 --- a/compiler/optimizing/instruction_builder.cc +++ b/compiler/optimizing/instruction_builder.cc @@ -305,7 +305,7 @@ void HInstructionBuilder::InitializeInstruction(HInstruction* instruction) { graph_->GetArtMethod(), instruction->GetDexPc(), instruction); - environment->CopyFrom(ArrayRef(*current_locals_)); + environment->CopyFrom(allocator_, ArrayRef(*current_locals_)); instruction->SetRawEnvironment(environment); } } -- cgit v1.2.3-59-g8ed1b