From ef898425c975f150caaed077ca204fa86b951e7f Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Mon, 8 Jun 2020 10:26:06 +0100 Subject: Run LSA as a part of the LSE pass. Make LSA a helper class, not an optimization pass. Move all its allocations to ScopedArenaAllocator to reduce the peak memory usage a little bit. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Change-Id: I7fc634abe732d22c99005921ffecac5207bcf05f --- compiler/optimizing/scheduler.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'compiler/optimizing/scheduler.cc') diff --git a/compiler/optimizing/scheduler.cc b/compiler/optimizing/scheduler.cc index f722cf91a7..ea5a13a0db 100644 --- a/compiler/optimizing/scheduler.cc +++ b/compiler/optimizing/scheduler.cc @@ -559,7 +559,8 @@ void HScheduler::Schedule(HGraph* graph) { // We run lsa here instead of in a separate pass to better control whether we // should run the analysis or not. const HeapLocationCollector* heap_location_collector = nullptr; - LoadStoreAnalysis lsa(graph); + ScopedArenaAllocator allocator(graph->GetArenaStack()); + LoadStoreAnalysis lsa(graph, &allocator); if (!only_optimize_loop_blocks_ || graph->HasLoops()) { lsa.Run(); heap_location_collector = &lsa.GetHeapLocationCollector(); -- cgit v1.2.3-59-g8ed1b