diff options
author | 2024-10-04 06:39:30 +0000 | |
---|---|---|
committer | 2024-10-04 14:04:37 +0000 | |
commit | 92a62ec92ef7ea0f047f5be569388608136b4803 (patch) | |
tree | b9ab473da3bff19055c9468b63513ca4e36e3175 /compiler/optimizing/nodes.cc | |
parent | c7f1c1039a7eb4abdfd3800c1b876d546c3059f8 (diff) |
Reduce memory used by `HEnvironment`.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 181943478
Change-Id: Ie05d4001e411a669e11b8edda375414e5da52ae2
Diffstat (limited to 'compiler/optimizing/nodes.cc')
-rw-r--r-- | compiler/optimizing/nodes.cc | 6 |
1 files changed, 3 insertions, 3 deletions
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<HInstruction* const> 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<HEnvironment*>& env_use = vregs_[index]; + const HUserRecord<HEnvironment*>& 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<HEnvironment*>& env_use_record = vregs_[index]; + const HUserRecord<HEnvironment*>& env_use_record = GetVRegs()[index]; HInstruction* orig_instr = env_use_record.GetInstruction(); DCHECK(orig_instr != replacement); |