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/code_generator.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'compiler/optimizing/code_generator.cc') diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc index 51714ef548..757fdc2cee 100644 --- a/compiler/optimizing/code_generator.cc +++ b/compiler/optimizing/code_generator.cc @@ -913,8 +913,9 @@ void CodeGenerator::BlockIfInRegister(Location location, bool is_out) const { } void CodeGenerator::AllocateLocations(HInstruction* instruction) { + ArenaAllocator* allocator = GetGraph()->GetAllocator(); for (HEnvironment* env = instruction->GetEnvironment(); env != nullptr; env = env->GetParent()) { - env->AllocateLocations(); + env->AllocateLocations(allocator); } instruction->Accept(GetLocationBuilder()); DCHECK(CheckTypeConsistency(instruction)); -- cgit v1.2.3-59-g8ed1b