diff options
author | 2017-10-03 14:49:14 +0100 | |
---|---|---|
committer | 2017-10-06 17:53:50 +0100 | |
commit | ca6fff898afcb62491458ae8bcd428bfb3043da1 (patch) | |
tree | 195a6b16d3a4b34acc2faf91ce56f448efb15e07 /compiler/optimizing/select_generator.cc | |
parent | aa7273e56fbafc2692c8d20a31b50d2f4bdd2aa1 (diff) |
ART: Use ScopedArenaAllocator for pass-local data.
Passes using local ArenaAllocator were hiding their memory
usage from the allocation counting, making it difficult to
track down where memory was used. Using ScopedArenaAllocator
reveals the memory usage.
This changes the HGraph constructor which requires a lot of
changes in tests. Refactor these tests to limit the amount
of work needed the next time we change that constructor.
Test: m test-art-host-gtest
Test: testrunner.py --host
Test: Build with kArenaAllocatorCountAllocations = true.
Bug: 64312607
Change-Id: I34939e4086b500d6e827ff3ef2211d1a421ac91a
Diffstat (limited to 'compiler/optimizing/select_generator.cc')
-rw-r--r-- | compiler/optimizing/select_generator.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/optimizing/select_generator.cc b/compiler/optimizing/select_generator.cc index 827b5913af..0e46aeca37 100644 --- a/compiler/optimizing/select_generator.cc +++ b/compiler/optimizing/select_generator.cc @@ -135,10 +135,10 @@ void HSelectGenerator::Run() { DCHECK(both_successors_return || phi != nullptr); // Create the Select instruction and insert it in front of the If. - HSelect* select = new (graph_->GetArena()) HSelect(if_instruction->InputAt(0), - true_value, - false_value, - if_instruction->GetDexPc()); + HSelect* select = new (graph_->GetAllocator()) HSelect(if_instruction->InputAt(0), + true_value, + false_value, + if_instruction->GetDexPc()); if (both_successors_return) { if (true_value->GetType() == DataType::Type::kReference) { DCHECK(false_value->GetType() == DataType::Type::kReference); |