summaryrefslogtreecommitdiff
path: root/compiler/optimizing/superblock_cloner.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/superblock_cloner.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/superblock_cloner.cc')
-rw-r--r--compiler/optimizing/superblock_cloner.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/optimizing/superblock_cloner.cc b/compiler/optimizing/superblock_cloner.cc
index a7328a1218..5ab34fb1a8 100644
--- a/compiler/optimizing/superblock_cloner.cc
+++ b/compiler/optimizing/superblock_cloner.cc
@@ -144,7 +144,7 @@ void SuperblockCloner::DeepCloneEnvironmentWithRemapping(HInstruction* copy_inst
}
copy_env->SetRawEnvAt(i, env_input);
if (env_input != nullptr) {
- env_input->AddEnvUseAt(copy_env, i);
+ env_input->AddEnvUseAt(graph_->GetAllocator(), copy_env, i);
}
}
// InsertRawEnvironment assumes that instruction already has an environment that's why we use