diff options
author | 2025-02-17 08:55:37 +0000 | |
---|---|---|
committer | 2025-02-17 23:11:18 -0800 | |
commit | e82d04b37415974cfd85be881f50656610890daf (patch) | |
tree | 0bb0e16e21f976d50bc6b94e2852991b7773d72b /compiler/optimizing/nodes_test.cc | |
parent | 474e99956e8be96e84404b5be6ad075bb5cb6b79 (diff) |
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
Diffstat (limited to 'compiler/optimizing/nodes_test.cc')
-rw-r--r-- | compiler/optimizing/nodes_test.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/optimizing/nodes_test.cc b/compiler/optimizing/nodes_test.cc index 5f71d053c6..97f74cb7b9 100644 --- a/compiler/optimizing/nodes_test.cc +++ b/compiler/optimizing/nodes_test.cc @@ -248,7 +248,7 @@ TEST_F(NodeTest, ParentEnvironment) { graph->GetArtMethod(), /*dex_pc=*/ 0, /*holder=*/ nullptr); - parent1->CopyFrom(ArrayRef<HInstruction* const>(¶meter1, 1u)); + parent1->CopyFrom(GetAllocator(), ArrayRef<HInstruction* const>(¶meter1, 1u)); ASSERT_EQ(parameter1->GetEnvUses().SizeSlow(), 2u); @@ -258,7 +258,7 @@ TEST_F(NodeTest, ParentEnvironment) { graph->GetArtMethod(), /*dex_pc=*/ 0, /*holder=*/ nullptr); - parent2->CopyFrom(ArrayRef<HInstruction* const>(¶meter1, 1u)); + parent2->CopyFrom(GetAllocator(), ArrayRef<HInstruction* const>(¶meter1, 1u)); parent1->SetAndCopyParentChain(GetAllocator(), parent2); // One use for parent2, and one other use for the new parent of parent1. |