summaryrefslogtreecommitdiff
path: root/compiler/optimizing/bounds_check_elimination.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/bounds_check_elimination.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/bounds_check_elimination.cc')
-rw-r--r--compiler/optimizing/bounds_check_elimination.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/optimizing/bounds_check_elimination.cc b/compiler/optimizing/bounds_check_elimination.cc
index c0d4c37659..1ef4d751a2 100644
--- a/compiler/optimizing/bounds_check_elimination.cc
+++ b/compiler/optimizing/bounds_check_elimination.cc
@@ -1983,7 +1983,7 @@ class BCEVisitor final : public HGraphVisitor {
}
user->RemoveAsUserOfInput(index);
user->SetRawEnvAt(index, phi);
- phi->AddEnvUseAt(user, index);
+ phi->AddEnvUseAt(GetGraph()->GetAllocator(), user, index);
}
}
}