From 92a62ec92ef7ea0f047f5be569388608136b4803 Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Fri, 4 Oct 2024 06:39:30 +0000 Subject: Reduce memory used by `HEnvironment`. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Bug: 181943478 Change-Id: Ie05d4001e411a669e11b8edda375414e5da52ae2 --- compiler/optimizing/nodes.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'compiler/optimizing/nodes.cc') diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc index 32ae89eeea..f7ec0871d4 100644 --- a/compiler/optimizing/nodes.cc +++ b/compiler/optimizing/nodes.cc @@ -1142,7 +1142,7 @@ void HEnvironment::CopyFrom(ArrayRef locals) { } } -void HEnvironment::CopyFrom(HEnvironment* env) { +void HEnvironment::CopyFrom(const HEnvironment* env) { for (size_t i = 0; i < env->Size(); i++) { HInstruction* instruction = env->GetInstructionAt(i); SetRawEnvAt(i, instruction); @@ -1174,7 +1174,7 @@ void HEnvironment::CopyFromWithLoopPhiAdjustment(HEnvironment* env, } void HEnvironment::RemoveAsUserOfInput(size_t index) const { - const HUserRecord& env_use = vregs_[index]; + const HUserRecord& env_use = GetVRegs()[index]; HInstruction* user = env_use.GetInstruction(); auto before_env_use_node = env_use.GetBeforeUseNode(); user->env_uses_.erase_after(before_env_use_node); @@ -1182,7 +1182,7 @@ void HEnvironment::RemoveAsUserOfInput(size_t index) const { } void HEnvironment::ReplaceInput(HInstruction* replacement, size_t index) { - const HUserRecord& env_use_record = vregs_[index]; + const HUserRecord& env_use_record = GetVRegs()[index]; HInstruction* orig_instr = env_use_record.GetInstruction(); DCHECK(orig_instr != replacement); -- cgit v1.2.3-59-g8ed1b