Home
last modified time | relevance | path

Searched refs:block (Results 1 – 25 of 33) sorted by relevance

12

/art/compiler/optimizing/
Dssa_liveness_analysis.cc50 static void VisitBlockForLinearization(HBasicBlock* block, in VisitBlockForLinearization() argument
53 if (visited->IsBitSet(block->GetBlockId())) { in VisitBlockForLinearization()
56 visited->SetBit(block->GetBlockId()); in VisitBlockForLinearization()
57 size_t number_of_successors = block->GetSuccessors().Size(); in VisitBlockForLinearization()
61 VisitBlockForLinearization(block->GetSuccessors().Get(0), order, visited); in VisitBlockForLinearization()
64 HBasicBlock* first_successor = block->GetSuccessors().Get(0); in VisitBlockForLinearization()
65 HBasicBlock* second_successor = block->GetSuccessors().Get(1); in VisitBlockForLinearization()
66 HLoopInformation* my_loop = block->GetLoopInformation(); in VisitBlockForLinearization()
82 order->Add(block); in VisitBlockForLinearization()
105 HBasicBlock* block = it.Current(); in NumberInstructions() local
[all …]
Dnodes.cc23 void HGraph::AddBlock(HBasicBlock* block) { in AddBlock() argument
24 block->SetBlockId(blocks_.Size()); in AddBlock()
25 blocks_.Add(block); in AddBlock()
36 HBasicBlock* block = blocks_.Get(i); in RemoveDeadBlocks() local
37 for (size_t j = 0; j < block->GetSuccessors().Size(); ++j) { in RemoveDeadBlocks()
38 block->GetSuccessors().Get(j)->RemovePredecessor(block); in RemoveDeadBlocks()
40 for (HInstructionIterator it(block->GetPhis()); !it.Done(); it.Advance()) { in RemoveDeadBlocks()
41 block->RemovePhi(it.Current()->AsPhi()); in RemoveDeadBlocks()
43 for (HInstructionIterator it(block->GetInstructions()); !it.Done(); it.Advance()) { in RemoveDeadBlocks()
44 block->RemoveInstruction(it.Current()); in RemoveDeadBlocks()
[all …]
Dssa_builder.cc34 HBasicBlock* block = loop_headers_.Get(i); in BuildSsa() local
35 for (HInstructionIterator it(block->GetPhis()); !it.Done(); it.Advance()) { in BuildSsa()
37 for (size_t pred = 0; pred < block->GetPredecessors().Size(); pred++) { in BuildSsa()
38 HInstruction* input = ValueOfLocal(block->GetPredecessors().Get(pred), phi->GetRegNumber()); in BuildSsa()
60 HInstruction* SsaBuilder::ValueOfLocal(HBasicBlock* block, size_t local) { in ValueOfLocal() argument
61 return GetLocalsFor(block)->Get(local); in ValueOfLocal()
64 void SsaBuilder::VisitBasicBlock(HBasicBlock* block) { in VisitBasicBlock() argument
65 current_locals_ = GetLocalsFor(block); in VisitBasicBlock()
67 if (block->IsLoopHeader()) { in VisitBasicBlock()
73 HInstruction* incoming = ValueOfLocal(block->GetLoopInformation()->GetPreHeader(), local); in VisitBasicBlock()
[all …]
Dgraph_visualizer.cc84 void PrintPredecessors(HBasicBlock* block) { in PrintPredecessors() argument
87 for (size_t i = 0, e = block->GetPredecessors().Size(); i < e; ++i) { in PrintPredecessors()
88 HBasicBlock* predecessor = block->GetPredecessors().Get(i); in PrintPredecessors()
94 void PrintSuccessors(HBasicBlock* block) { in PrintSuccessors() argument
97 for (size_t i = 0, e = block->GetSuccessors().Size(); i < e; ++i) { in PrintSuccessors()
98 HBasicBlock* successor = block->GetSuccessors().Get(i); in PrintSuccessors()
191 void VisitBasicBlock(HBasicBlock* block) { in VisitBasicBlock() argument
193 PrintProperty("name", "B", block->GetBlockId()); in VisitBasicBlock()
194 if (block->GetLifetimeStart() != kNoLifetime) { in VisitBasicBlock()
196 PrintInt("from_bci", block->GetLifetimeStart()); in VisitBasicBlock()
[all …]
Dgraph_test.cc41 HBasicBlock* block = new (allocator) HBasicBlock(graph); in createGotoBlock() local
42 graph->AddBlock(block); in createGotoBlock()
44 block->AddInstruction(got); in createGotoBlock()
45 return block; in createGotoBlock()
49 HBasicBlock* block = new (allocator) HBasicBlock(graph); in createReturnBlock() local
50 graph->AddBlock(block); in createReturnBlock()
52 block->AddInstruction(return_instr); in createReturnBlock()
53 return block; in createReturnBlock()
57 HBasicBlock* block = new (allocator) HBasicBlock(graph); in createExitBlock() local
58 graph->AddBlock(block); in createExitBlock()
[all …]
Dpretty_printer.h71 virtual void VisitBasicBlock(HBasicBlock* block) { in VisitBasicBlock() argument
73 PrintInt(block->GetBlockId()); in VisitBasicBlock()
74 const GrowableArray<HBasicBlock*>& predecessors = block->GetPredecessors(); in VisitBasicBlock()
83 const GrowableArray<HBasicBlock*>& successors = block->GetSuccessors(); in VisitBasicBlock()
93 HGraphVisitor::VisitBasicBlock(block); in VisitBasicBlock()
125 virtual void VisitBasicBlock(HBasicBlock* block) { in VisitBasicBlock() argument
126 current_block_ = block; in VisitBasicBlock()
127 HPrettyPrinter::VisitBasicBlock(block); in VisitBasicBlock()
Dssa_builder.h38 GrowableArray<HInstruction*>* GetLocalsFor(HBasicBlock* block) { in GetLocalsFor() argument
39 HEnvironment* env = locals_for_.Get(block->GetBlockId()); in GetLocalsFor()
43 locals_for_.Put(block->GetBlockId(), env); in GetLocalsFor()
48 HInstruction* ValueOfLocal(HBasicBlock* block, size_t local);
50 void VisitBasicBlock(HBasicBlock* block);
Dssa_phi_elimination.cc24 HBasicBlock* block = it.Current(); in Run() local
25 for (HInstructionIterator it(block->GetPhis()); !it.Done(); it.Advance()) { in Run()
59 HBasicBlock* block = it.Current(); in Run() local
60 HInstruction* current = block->GetFirstPhi(); in Run()
65 block->RemovePhi(current->AsPhi()); in Run()
75 HBasicBlock* block = it.Current(); in Run() local
76 for (HInstructionIterator it(block->GetPhis()); !it.Done(); it.Advance()) { in Run()
Dssa_type_propagation.cc56 void SsaTypePropagation::VisitBasicBlock(HBasicBlock* block) { in VisitBasicBlock() argument
57 if (block->IsLoopHeader()) { in VisitBasicBlock()
58 for (HInstructionIterator it(block->GetPhis()); !it.Done(); it.Advance()) { in VisitBasicBlock()
66 for (HInstructionIterator it(block->GetPhis()); !it.Done(); it.Advance()) { in VisitBasicBlock()
Dlive_ranges_test.cc70 HBasicBlock* block = graph->GetBlocks().Get(1); in TEST() local
71 ASSERT_TRUE(block->GetLastInstruction()->AsReturn() != nullptr); in TEST()
72 ASSERT_EQ(8u, block->GetLastInstruction()->GetLifetimePosition()); in TEST()
116 HBasicBlock* block = graph->GetBlocks().Get(3); in TEST() local
117 ASSERT_TRUE(block->GetLastInstruction()->AsReturn() != nullptr); in TEST()
118 ASSERT_EQ(22u, block->GetLastInstruction()->GetLifetimePosition()); in TEST()
Dssa_liveness_analysis.h28 BlockInfo(ArenaAllocator* allocator, const HBasicBlock& block, size_t number_of_ssa_values) in BlockInfo() argument
29 : block_(block), in BlockInfo()
183 void AddPhiUse(HInstruction* instruction, size_t input_index, HBasicBlock* block) { in AddPhiUse() argument
186 instruction, input_index, false, block->GetLifetimeEnd(), first_use_); in AddPhiUse()
482 BitVector* GetLiveInSet(const HBasicBlock& block) const { in GetLiveInSet() argument
483 return &block_infos_.Get(block.GetBlockId())->live_in_; in GetLiveInSet()
486 BitVector* GetLiveOutSet(const HBasicBlock& block) const { in GetLiveOutSet() argument
487 return &block_infos_.Get(block.GetBlockId())->live_out_; in GetLiveOutSet()
490 BitVector* GetKillSet(const HBasicBlock& block) const { in GetKillSet() argument
491 return &block_infos_.Get(block.GetBlockId())->kill_; in GetKillSet()
[all …]
Dliveness_test.cc58 HBasicBlock* block = it.Current(); in TestCode() local
59 buffer << "Block " << block->GetBlockId() << std::endl; in TestCode()
61 BitVector* live_in = liveness.GetLiveInSet(*block); in TestCode()
63 BitVector* live_out = liveness.GetLiveOutSet(*block); in TestCode()
65 BitVector* kill = liveness.GetKillSet(*block); in TestCode()
Dnodes.h89 void SetEntryBlock(HBasicBlock* block) { entry_block_ = block; } in SetEntryBlock() argument
90 void SetExitBlock(HBasicBlock* block) { exit_block_ = block; } in SetExitBlock() argument
92 void AddBlock(HBasicBlock* block);
103 void SplitCriticalEdge(HBasicBlock* block, HBasicBlock* successor);
152 void VisitBlockForDominatorTree(HBasicBlock* block,
156 void VisitBlockForBackEdges(HBasicBlock* block,
209 bool IsBackEdge(HBasicBlock* block) { in IsBackEdge() argument
211 if (back_edges_.Get(i) == block) return true; in IsBackEdge()
236 bool Contains(const HBasicBlock& block) const;
246 void PopulateRecursive(HBasicBlock* block);
[all …]
Dcode_generator.cc50 HBasicBlock* block = blocks.Get(i); in CompileBaseline() local
51 Bind(GetLabelOf(block)); in CompileBaseline()
54 for (HInstructionIterator it(block->GetInstructions()); !it.Done(); it.Advance()) { in CompileBaseline()
79 HBasicBlock* block = blocks.Get(i); in CompileOptimized() local
80 Bind(GetLabelOf(block)); in CompileOptimized()
82 for (HInstructionIterator it(block->GetInstructions()); !it.Done(); it.Advance()) { in CompileOptimized()
250 Label* CodeGenerator::GetLabelOf(HBasicBlock* block) const { in GetLabelOf()
251 return block_labels_.GetRawStorage() + block->GetBlockId(); in GetLabelOf()
Dregister_allocator.cc740 void RegisterAllocator::InsertParallelMoveAtExitOf(HBasicBlock* block, in InsertParallelMoveAtExitOf() argument
745 DCHECK_EQ(block->GetSuccessors().Size(), 1u); in InsertParallelMoveAtExitOf()
746 HInstruction* last = block->GetLastInstruction(); in InsertParallelMoveAtExitOf()
752 || previous->AsParallelMove()->GetLifetimePosition() != block->GetLifetimeEnd()) { in InsertParallelMoveAtExitOf()
754 move->SetLifetimePosition(block->GetLifetimeEnd()); in InsertParallelMoveAtExitOf()
755 block->InsertInstructionBefore(move, last); in InsertParallelMoveAtExitOf()
762 void RegisterAllocator::InsertParallelMoveAtEntryOf(HBasicBlock* block, in InsertParallelMoveAtEntryOf() argument
767 HInstruction* first = block->GetFirstInstruction(); in InsertParallelMoveAtEntryOf()
771 if (move == nullptr || move->GetLifetimePosition() != block->GetLifetimeStart()) { in InsertParallelMoveAtEntryOf()
773 move->SetLifetimePosition(block->GetLifetimeStart()); in InsertParallelMoveAtEntryOf()
[all …]
Dfind_loops_test.cc116 HBasicBlock* block = graph->GetBlocks().Get(block_id); in TestBlock() local
117 ASSERT_EQ(block->IsLoopHeader(), is_loop_header); in TestBlock()
119 ASSERT_EQ(block->GetLoopInformation(), nullptr); in TestBlock()
121 ASSERT_EQ(block->GetLoopInformation()->GetHeader()->GetBlockId(), parent_loop_header_id); in TestBlock()
125 HLoopInformation* info = block->GetLoopInformation(); in TestBlock()
132 ASSERT_FALSE(block->IsLoopHeader()); in TestBlock()
Dbuilder.cc217 HBasicBlock* block = FindBlockStartingAt(index); in MaybeUpdateCurrentBlock() local
218 if (block == nullptr) { in MaybeUpdateCurrentBlock()
227 current_block_->AddSuccessor(block); in MaybeUpdateCurrentBlock()
229 graph_->AddBlock(block); in MaybeUpdateCurrentBlock()
230 current_block_ = block; in MaybeUpdateCurrentBlock()
238 HBasicBlock* block = new (arena_) HBasicBlock(graph_); in ComputeBranchTargets() local
239 branch_targets_.Put(0, block); in ComputeBranchTargets()
240 entry_block_->AddSuccessor(block); in ComputeBranchTargets()
251 block = new (arena_) HBasicBlock(graph_); in ComputeBranchTargets()
252 branch_targets_.Put(target, block); in ComputeBranchTargets()
[all …]
Dregister_allocator.h110 void InsertParallelMoveAtExitOf(HBasicBlock* block, Location source, Location destination) const;
111 void InsertParallelMoveAtEntryOf(HBasicBlock* block, Location source, Location destination) const;
Dssa_test.cc68 HBasicBlock* block = graph->GetBlocks().Get(i); in ReNumberInstructions() local
69 for (HInstructionIterator it(block->GetPhis()); !it.Done(); it.Advance()) { in ReNumberInstructions()
72 for (HInstructionIterator it(block->GetInstructions()); !it.Done(); it.Advance()) { in ReNumberInstructions()
Dssa_type_propagation.h33 void VisitBasicBlock(HBasicBlock* block);
Dcode_generator.h81 Label* GetLabelOf(HBasicBlock* block) const;
/art/compiler/dex/
Dssa_transformation.cc53 res = NeedsVisit(GetBasicBlock(sbi->block)); in NextUnvisitedSuccessor()
64 void MIRGraph::MarkPreOrder(BasicBlock* block) { in MarkPreOrder() argument
65 block->visited = true; in MarkPreOrder()
67 if (block->id != NullBasicBlockId) { in MarkPreOrder()
68 dfs_order_->Insert(block->id); in MarkPreOrder()
72 void MIRGraph::RecordDFSOrders(BasicBlock* block) { in RecordDFSOrders() argument
75 MarkPreOrder(block); in RecordDFSOrders()
76 succ.push_back(block); in RecordDFSOrders()
254 BasicBlock* succ_bb = GetBasicBlock(successor_block_info->block); in ComputeDominanceFrontier()
481 BasicBlock* succ_bb = GetBasicBlock(successor_block_info->block); in ComputeBlockLiveIns()
[all …]
Dmir_graph.cc208 BasicBlock* bb = GetBasicBlock(successor_block_info->block); in SplitBlock()
525 successor_block_info->block = case_block->id; in ProcessCanSwitch()
579 successor_block_info->block = catch_block->id; in ProcessCanThrow()
978 BasicBlock* dest_block = GetBasicBlock(successor_block_info->block); in DumpCFG()
1003 BasicBlock* dest_block = GetBasicBlock(successor_block_info->block); in DumpCFG()
1849 if (successor_block_info->block != NullBasicBlockId) { in Next()
1850 return mir_graph_->GetBasicBlock(successor_block_info->block); in Next()
2128 if (successor_block_info->block == old_bb) { in ReplaceChild()
2129 successor_block_info->block = new_bb; in ReplaceChild()
/art/test/084-class-init/
Dexpected.txt6 SlowInit static block pre-sleep
7 SlowInit static block post-sleep
/art/compiler/sea_ir/code_gen/
Dcode_gen.h45 void AddBlock(int region_id, llvm::BasicBlock* block) { in AddBlock() argument
46 blocks_.insert(std::pair<int, llvm::BasicBlock*>(region_id, block)); in AddBlock()
49 void AddBlock(Region* region, llvm::BasicBlock* block) { in AddBlock() argument
50 AddBlock(region->Id(), block); in AddBlock()

12