diff options
author | 2024-03-22 10:45:15 +0000 | |
---|---|---|
committer | 2024-03-25 13:43:14 +0000 | |
commit | 56dcaeec46dd53e271d6f201d2028996bf19f9dd (patch) | |
tree | ea607494f1912d60e838be94919e25db2ec3ac89 /compiler/optimizing/nodes.cc | |
parent | 9c4a2b5bb3695349e31a00492731e578e8853a21 (diff) |
Remove extra uses of ClearAllBits
ArenaBitVector creation guarantees it starts empty. Add a debug
check to make sure this assumption doesn't change.
Note that ArenaAllocator guarantees zero-initialized memory but
ScopedArenaAllocators do not. This is fine either way since the
BitVector constructor calls ClearAllBits.
Bug: 329037671
Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b
Change-Id: Icbf5e5dd1869e80b5d5828ecca9f13de30c0242b
Diffstat (limited to 'compiler/optimizing/nodes.cc')
-rw-r--r-- | compiler/optimizing/nodes.cc | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc index ba268560e8..f2cac19786 100644 --- a/compiler/optimizing/nodes.cc +++ b/compiler/optimizing/nodes.cc @@ -72,7 +72,6 @@ void HGraph::FindBackEdges(ArenaBitVector* visited) { // Nodes that we're currently visiting, indexed by block id. ArenaBitVector visiting( &allocator, blocks_.size(), /* expandable= */ false, kArenaAllocGraphBuilder); - visiting.ClearAllBits(); // Number of successors visited from a given node, indexed by block id. ScopedArenaVector<size_t> successors_visited(blocks_.size(), 0u, @@ -219,7 +218,6 @@ GraphAnalysisResult HGraph::BuildDominatorTree() { ScopedArenaAllocator allocator(GetArenaStack()); ArenaBitVector visited(&allocator, blocks_.size(), false, kArenaAllocGraphBuilder); - visited.ClearAllBits(); // (1) Find the back edges in the graph doing a DFS traversal. FindBackEdges(&visited); @@ -890,7 +888,6 @@ void HLoopInformation::Populate() { graph->GetBlocks().size(), /* expandable= */ false, kArenaAllocGraphBuilder); - visited.ClearAllBits(); // Stop marking blocks at the loop header. visited.SetBit(header_->GetBlockId()); @@ -1221,7 +1218,6 @@ std::ostream& HInstruction::Dump(std::ostream& os, bool dump_args) { (graph != nullptr) ? graph->GetCurrentInstructionId() : 0u, /* expandable= */ (graph == nullptr), kArenaAllocMisc); - visited.ClearAllBits(); visited.SetBit(GetId()); // Keep a queue of instructions with their indentations. ScopedArenaDeque<std::pair<HInstruction*, size_t>> queue(allocator.Adapter(kArenaAllocMisc)); @@ -1424,7 +1420,6 @@ void HInstruction::ReplaceUsesDominatedBy(HInstruction* dominator, graph->GetBlocks().size(), /* expandable= */ false, kArenaAllocMisc); - visited_blocks->ClearAllBits(); ScopedArenaAllocator allocator(graph->GetArenaStack()); ScopedArenaQueue<const HBasicBlock*> worklist(allocator.Adapter(kArenaAllocMisc)); worklist.push(dominator_block); |