summaryrefslogtreecommitdiff
path: root/compiler/dex/ssa_transformation.cc
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2016-03-21 12:01:50 +0000
committer Vladimir Marko <vmarko@google.com> 2016-03-21 16:50:08 +0000
commitf6a35de9eeefb20f6446f1b4815b4dcb0161d09c (patch)
treecf484acbd6889b92a7fe3e8615611129088c3894 /compiler/dex/ssa_transformation.cc
parent459898dc4470559ba1e1d578bc52a914d1f573f5 (diff)
Optimizing: Fix register allocator validation memory usage.
Also attribute ArenaBitVector allocations to appropriate passes. This was used to track down the source of the excessive memory alloactions. Bug: 27690481 Change-Id: Ib895984cb7c04e24cbc7abbd8322079bab8ab100
Diffstat (limited to 'compiler/dex/ssa_transformation.cc')
-rw-r--r--compiler/dex/ssa_transformation.cc13
1 files changed, 5 insertions, 8 deletions
diff --git a/compiler/dex/ssa_transformation.cc b/compiler/dex/ssa_transformation.cc
index 6ed666b9f7..6d5b3510b5 100644
--- a/compiler/dex/ssa_transformation.cc
+++ b/compiler/dex/ssa_transformation.cc
@@ -144,7 +144,7 @@ void MIRGraph::ComputeDefBlockMatrix() {
/* Initialize num_register vectors with num_blocks bits each */
for (i = 0; i < num_registers; i++) {
temp_.ssa.def_block_matrix[i] = new (temp_scoped_alloc_.get()) ArenaBitVector(
- arena_, GetNumBlocks(), false, kBitMapBMatrix);
+ arena_, GetNumBlocks(), false);
temp_.ssa.def_block_matrix[i]->ClearAllBits();
}
@@ -248,12 +248,9 @@ void MIRGraph::InitializeDominationInfo(BasicBlock* bb) {
int num_total_blocks = GetBasicBlockListCount();
if (bb->dominators == nullptr) {
- bb->dominators = new (arena_) ArenaBitVector(arena_, num_total_blocks,
- true /* expandable */, kBitMapDominators);
- bb->i_dominated = new (arena_) ArenaBitVector(arena_, num_total_blocks,
- true /* expandable */, kBitMapIDominated);
- bb->dom_frontier = new (arena_) ArenaBitVector(arena_, num_total_blocks,
- true /* expandable */, kBitMapDomFrontier);
+ bb->dominators = new (arena_) ArenaBitVector(arena_, num_total_blocks, true /* expandable */);
+ bb->i_dominated = new (arena_) ArenaBitVector(arena_, num_total_blocks, true /* expandable */);
+ bb->dom_frontier = new (arena_) ArenaBitVector(arena_, num_total_blocks, true /* expandable */);
} else {
bb->dominators->ClearAllBits();
bb->i_dominated->ClearAllBits();
@@ -471,7 +468,7 @@ void MIRGraph::FindPhiNodeBlocks() {
}
ArenaBitVector* phi_blocks = new (temp_scoped_alloc_.get()) ArenaBitVector(
- temp_scoped_alloc_.get(), GetNumBlocks(), false, kBitMapBMatrix);
+ temp_scoped_alloc_.get(), GetNumBlocks(), false);
// Reuse the def_block_matrix storage for phi_node_blocks.
ArenaBitVector** def_block_matrix = temp_.ssa.def_block_matrix;