summaryrefslogtreecommitdiff
path: root/compiler/optimizing/scheduler_test.cc
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2025-02-17 08:55:37 +0000
committer VladimĂ­r Marko <vmarko@google.com> 2025-02-17 23:11:18 -0800
commite82d04b37415974cfd85be881f50656610890daf (patch)
tree0bb0e16e21f976d50bc6b94e2852991b7773d72b /compiler/optimizing/scheduler_test.cc
parent474e99956e8be96e84404b5be6ad075bb5cb6b79 (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/scheduler_test.cc')
-rw-r--r--compiler/optimizing/scheduler_test.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/optimizing/scheduler_test.cc b/compiler/optimizing/scheduler_test.cc
index 7003bd2715..6359119a87 100644
--- a/compiler/optimizing/scheduler_test.cc
+++ b/compiler/optimizing/scheduler_test.cc
@@ -118,9 +118,9 @@ class SchedulerTest : public CommonCompilerTest, public OptimizingUnitTestHelper
div_check);
div_check->SetRawEnvironment(environment);
environment->SetRawEnvAt(0, add2);
- add2->AddEnvUseAt(div_check->GetEnvironment(), 0);
+ add2->AddEnvUseAt(GetAllocator(), div_check->GetEnvironment(), 0);
environment->SetRawEnvAt(1, mul);
- mul->AddEnvUseAt(div_check->GetEnvironment(), 1);
+ mul->AddEnvUseAt(GetAllocator(), div_check->GetEnvironment(), 1);
TestSchedulingGraph scheduling_graph(GetScopedAllocator());
// Instructions must be inserted in reverse order into the scheduling graph.