diff options
author | 2025-02-20 12:08:02 +0000 | |
---|---|---|
committer | 2025-02-21 02:56:13 -0800 | |
commit | 191dd4948709c2bf6272f503e642d248740327cd (patch) | |
tree | 0de003a1c293d51c7ef64d081909f8d00b6112fc /compiler/optimizing/code_sinking.cc | |
parent | 0ecda2b3ac174712e84e84375007f18b3a3f0133 (diff) |
Speed up `HGraph::BuildDominatorTree()`.
Add some functions from `BitVector` to `BitVectorView<>`
and use this to speed up `HGraph::BuildDominatorTree()`.
Also clean up code sinking. This was a missed opportunity in
https://android-review.googlesource.com/3500455 .
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 331194861
Change-Id: Iec03db8b44af38c549447ccfa0bf8dab731b550d
Diffstat (limited to 'compiler/optimizing/code_sinking.cc')
-rw-r--r-- | compiler/optimizing/code_sinking.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/optimizing/code_sinking.cc b/compiler/optimizing/code_sinking.cc index b1d14132c4..9ba5416697 100644 --- a/compiler/optimizing/code_sinking.cc +++ b/compiler/optimizing/code_sinking.cc @@ -409,8 +409,8 @@ void CodeSinking::SinkCodeToUncommonBranch(HBasicBlock* end_block) { HBasicBlock* common_dominator = finder.Get(); // Step (2): iterate over the worklist to find sinking candidates. - ArenaBitVector instructions_that_can_move( - &allocator, number_of_instructions, /* expandable= */ false); + BitVectorView<size_t> instructions_that_can_move = + ArenaBitVector::CreateFixedSize(&allocator, number_of_instructions); ScopedArenaVector<ScopedArenaVector<HInstruction*>> instructions_to_move( graph_->GetBlocks().size(), ScopedArenaVector<HInstruction*>(allocator.Adapter(kArenaAllocMisc)), |