/art/compiler/optimizing/ |
H A D | ssa_phi_elimination.cc | 24 HBasicBlock* block = it.Current(); local 25 for (HInstructionIterator it(block->GetPhis()); !it.Done(); it.Advance()) { 59 HBasicBlock* block = it.Current(); local 60 HInstruction* current = block->GetFirstPhi(); 65 block->RemovePhi(current->AsPhi()); 75 HBasicBlock* block = it.Current(); local 76 for (HInstructionIterator it(block->GetPhis()); !it.Done(); it.Advance()) {
|
H A D | live_ranges_test.cc | 70 HBasicBlock* block = graph->GetBlocks().Get(1); local 71 ASSERT_TRUE(block->GetLastInstruction()->AsReturn() != nullptr); 72 ASSERT_EQ(8u, block->GetLastInstruction()->GetLifetimePosition()); 116 HBasicBlock* block = graph->GetBlocks().Get(3); local 117 ASSERT_TRUE(block->GetLastInstruction()->AsReturn() != nullptr); 118 ASSERT_EQ(22u, block->GetLastInstruction()->GetLifetimePosition()); 164 // Last use is the phi at the return block so instruction is live until 165 // the end of the then block. 172 // First range starts from the definition and ends at the if block. 175 // 14 is the end of the if block [all...] |
H A D | ssa_builder.h | 38 GrowableArray<HInstruction*>* GetLocalsFor(HBasicBlock* block) { argument 39 HEnvironment* env = locals_for_.Get(block->GetBlockId()); 43 locals_for_.Put(block->GetBlockId(), env); 48 HInstruction* ValueOfLocal(HBasicBlock* block, size_t local); 50 void VisitBasicBlock(HBasicBlock* block); 56 // Locals for the current block being visited. 63 // HEnvironment for each block.
|
H A D | ssa_type_propagation.cc | 56 void SsaTypePropagation::VisitBasicBlock(HBasicBlock* block) { argument 57 if (block->IsLoopHeader()) { 58 for (HInstructionIterator it(block->GetPhis()); !it.Done(); it.Advance()) { 66 for (HInstructionIterator it(block->GetPhis()); !it.Done(); it.Advance()) {
|
H A D | find_loops_test.cc | 116 HBasicBlock* block = graph->GetBlocks().Get(block_id); local 117 ASSERT_EQ(block->IsLoopHeader(), is_loop_header); 119 ASSERT_EQ(block->GetLoopInformation(), nullptr); 121 ASSERT_EQ(block->GetLoopInformation()->GetHeader()->GetBlockId(), parent_loop_header_id); 125 HLoopInformation* info = block->GetLoopInformation(); 132 ASSERT_FALSE(block->IsLoopHeader()); 151 TestBlock(graph, 0, false, -1); // entry block 155 TestBlock(graph, 3, false, 2); // block in loop 156 TestBlock(graph, 4, false, -1); // return block 157 TestBlock(graph, 5, false, -1); // exit block [all...] |
H A D | liveness_test.cc | 58 HBasicBlock* block = it.Current(); local 59 buffer << "Block " << block->GetBlockId() << std::endl; 61 BitVector* live_in = liveness.GetLiveInSet(*block); 63 BitVector* live_out = liveness.GetLiveOutSet(*block); 65 BitVector* kill = liveness.GetKillSet(*block); 118 "Block 0\n" // entry block 122 "Block 1\n" // block with add 126 "Block 2\n" // block with return 130 "Block 3\n" // exit block 157 "Block 0\n" // entry block [all...] |
H A D | ssa_builder.cc | 25 // 1) Visit in reverse post order. We need to have all predecessors of a block visited 27 // block. For loops, we create phis whose inputs will be set in 2). 34 HBasicBlock* block = loop_headers_.Get(i); local 35 for (HInstructionIterator it(block->GetPhis()); !it.Done(); it.Advance()) { 37 for (size_t pred = 0; pred < block->GetPredecessors().Size(); pred++) { 38 HInstruction* input = ValueOfLocal(block->GetPredecessors().Get(pred), phi->GetRegNumber()); 60 HInstruction* SsaBuilder::ValueOfLocal(HBasicBlock* block, size_t local) { argument 61 return GetLocalsFor(block)->Get(local); 64 void SsaBuilder::VisitBasicBlock(HBasicBlock* block) { argument 65 current_locals_ = GetLocalsFor(block); [all...] |
H A D | graph_test.cc | 41 HBasicBlock* block = new (allocator) HBasicBlock(graph); local 42 graph->AddBlock(block); 44 block->AddInstruction(got); 45 return block; 49 HBasicBlock* block = new (allocator) HBasicBlock(graph); local 50 graph->AddBlock(block); 52 block->AddInstruction(return_instr); 53 return block; 57 HBasicBlock* block = new (allocator) HBasicBlock(graph); local 58 graph->AddBlock(block); 291 HBasicBlock* block = createGotoBlock(graph, &allocator); local [all...] |
H A D | pretty_printer.h | 71 virtual void VisitBasicBlock(HBasicBlock* block) { argument 73 PrintInt(block->GetBlockId()); 74 const GrowableArray<HBasicBlock*>& predecessors = block->GetPredecessors(); 83 const GrowableArray<HBasicBlock*>& successors = block->GetSuccessors(); 93 HGraphVisitor::VisitBasicBlock(block); 125 virtual void VisitBasicBlock(HBasicBlock* block) { argument 126 current_block_ = block; 127 HPrettyPrinter::VisitBasicBlock(block);
|
H A D | ssa_test.cc | 68 HBasicBlock* block = graph->GetBlocks().Get(i); local 69 for (HInstructionIterator it(block->GetPhis()); !it.Done(); it.Advance()) { 72 for (HInstructionIterator it(block->GetInstructions()); !it.Done(); it.Advance()) { 118 // Synthesized block to avoid critical edge. 132 // Test that we create a phi for the join block of an if control flow instruction 149 // Synthesized block to avoid critical edge. 163 // Test that we create a phi for the join block of an if control flow instruction 470 // Test that we do not create a phi in the join block when one predecessor 486 // Synthesized block to avoid critical edge. 518 // This block shoul [all...] |
H A D | graph_visualizer.cc | 84 void PrintPredecessors(HBasicBlock* block) { argument 87 for (size_t i = 0, e = block->GetPredecessors().Size(); i < e; ++i) { 88 HBasicBlock* predecessor = block->GetPredecessors().Get(i); 94 void PrintSuccessors(HBasicBlock* block) { argument 97 for (size_t i = 0, e = block->GetSuccessors().Size(); i < e; ++i) { 98 HBasicBlock* successor = block->GetSuccessors().Get(i); 191 void VisitBasicBlock(HBasicBlock* block) { argument 192 StartTag("block"); 193 PrintProperty("name", "B", block->GetBlockId()); 194 if (block [all...] |
H A D | nodes.cc | 23 void HGraph::AddBlock(HBasicBlock* block) { argument 24 block->SetBlockId(blocks_.Size()); 25 blocks_.Add(block); 36 HBasicBlock* block = blocks_.Get(i); local 37 for (size_t j = 0; j < block->GetSuccessors().Size(); ++j) { 38 block->GetSuccessors().Get(j)->RemovePredecessor(block); 40 for (HInstructionIterator it(block->GetPhis()); !it.Done(); it.Advance()) { 41 block->RemovePhi(it.Current()->AsPhi()); 43 for (HInstructionIterator it(block 50 VisitBlockForBackEdges(HBasicBlock* block, ArenaBitVector* visited, ArenaBitVector* visiting) argument 113 VisitBlockForDominatorTree(HBasicBlock* block, HBasicBlock* predecessor, GrowableArray<size_t>* visits) argument 140 SplitCriticalEdge(HBasicBlock* block, HBasicBlock* successor) argument 204 HBasicBlock* block = blocks_.Get(i); local 222 HBasicBlock* block = blocks_.Get(i); local 234 PopulateRecursive(HBasicBlock* block) argument 310 Add(HInstructionList* instruction_list, HBasicBlock* block, HInstruction* instruction) argument 328 Remove(HInstructionList* instruction_list, HBasicBlock* block, HInstruction* instruction) argument 439 VisitBasicBlock(HBasicBlock* block) argument [all...] |
H A D | ssa_liveness_analysis.cc | 50 static void VisitBlockForLinearization(HBasicBlock* block, argument 53 if (visited->IsBitSet(block->GetBlockId())) { 56 visited->SetBit(block->GetBlockId()); 57 size_t number_of_successors = block->GetSuccessors().Size(); 61 VisitBlockForLinearization(block->GetSuccessors().Get(0), order, visited); 64 HBasicBlock* first_successor = block->GetSuccessors().Get(0); 65 HBasicBlock* second_successor = block->GetSuccessors().Get(1); 66 HLoopInformation* my_loop = block->GetLoopInformation(); 82 order->Add(block); 95 // Each instruction gets a lifetime position, and a block get 105 HBasicBlock* block = it.Current(); local 147 HBasicBlock* block = it.Current(); local 168 HBasicBlock* block = it.Current(); local 261 const HBasicBlock& block = *it.Current(); local 273 UpdateLiveOut(const HBasicBlock& block) argument 287 UpdateLiveIn(const HBasicBlock& block) argument [all...] |
H A D | code_generator.cc | 50 HBasicBlock* block = blocks.Get(i); local 51 Bind(GetLabelOf(block)); 54 for (HInstructionIterator it(block->GetInstructions()); !it.Done(); it.Advance()) { 79 HBasicBlock* block = blocks.Get(i); local 80 Bind(GetLabelOf(block)); 82 for (HInstructionIterator it(block->GetInstructions()); !it.Done(); it.Advance()) { 246 // We currently iterate over the block in insertion order. 250 Label* CodeGenerator::GetLabelOf(HBasicBlock* block) const { 251 return block_labels_.GetRawStorage() + block->GetBlockId();
|
H A D | builder.cc | 180 // Setup the graph with the entry block and exit block. 192 // start a new block, and create these blocks. 201 // Update the current block if dex_offset starts a new block. 209 // Add the exit block at the end to give it the highest id. 217 HBasicBlock* block = FindBlockStartingAt(index); local 218 if (block == nullptr) { 224 // the last instruction of the current block is not a branching 225 // instruction. We add an unconditional goto to the found block 238 HBasicBlock* block = new (arena_) HBasicBlock(graph_); local [all...] |
H A D | register_allocator.cc | 712 // This is a parallel move for connecting siblings in a same block. We need to 723 // This is a parallel move for connecting siblings in a same block. We need to 740 void RegisterAllocator::InsertParallelMoveAtExitOf(HBasicBlock* block, argument 745 DCHECK_EQ(block->GetSuccessors().Size(), 1u); 746 HInstruction* last = block->GetLastInstruction(); 750 // it with moves for connecting siblings in a same block, and output moves. 752 || previous->AsParallelMove()->GetLifetimePosition() != block->GetLifetimeEnd()) { 754 move->SetLifetimePosition(block->GetLifetimeEnd()); 755 block->InsertInstructionBefore(move, last); 762 void RegisterAllocator::InsertParallelMoveAtEntryOf(HBasicBlock* block, argument 953 HBasicBlock* block = it.Current(); local [all...] |
H A D | ssa_liveness_analysis.h | 28 BlockInfo(ArenaAllocator* allocator, const HBasicBlock& block, size_t number_of_ssa_values) argument 29 : block_(block), 169 // There is a use later in the same block. 172 // Last use is in the following block. 183 void AddPhiUse(HInstruction* instruction, size_t input_index, HBasicBlock* block) { argument 186 instruction, input_index, false, block->GetLifetimeEnd(), first_use_); 193 // There is a use in the following block. 482 BitVector* GetLiveInSet(const HBasicBlock& block) const { 483 return &block_infos_.Get(block.GetBlockId())->live_in_; 486 BitVector* GetLiveOutSet(const HBasicBlock& block) cons [all...] |
H A D | nodes.h | 89 void SetEntryBlock(HBasicBlock* block) { entry_block_ = block; } argument 90 void SetExitBlock(HBasicBlock* block) { exit_block_ = block; } 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) { argument 211 if (back_edges_.Get(i) == block) retur 308 AddSuccessor(HBasicBlock* block) argument 321 RemovePredecessor(HBasicBlock* block) argument 329 AddPredecessor(HBasicBlock* block) argument 501 SetBlock(HBasicBlock* block) argument [all...] |
/art/compiler/sea_ir/code_gen/ |
H A D | code_gen.h | 44 // Records @block as corresponding to the sea_ir::Region with id @region_id. 45 void AddBlock(int region_id, llvm::BasicBlock* block) { argument 46 blocks_.insert(std::pair<int, llvm::BasicBlock*>(region_id, block)); 48 // Records @block as corresponding to the sea_ir::Region with @region. 49 void AddBlock(Region* region, llvm::BasicBlock* block) { argument 50 AddBlock(region->Id(), block);
|
/art/compiler/dex/ |
H A D | ssa_transformation.cc | 53 res = NeedsVisit(GetBasicBlock(sbi->block)); 64 void MIRGraph::MarkPreOrder(BasicBlock* block) { argument 65 block->visited = true; 66 /* Enqueue the pre_order block id */ 67 if (block->id != NullBasicBlockId) { 68 dfs_order_->Insert(block->id); 72 void MIRGraph::RecordDFSOrders(BasicBlock* block) { argument 75 MarkPreOrder(block); 76 succ.push_back(block); 133 * Mark block bi 581 DoDFSPreOrderSSARename(BasicBlock* block) argument [all...] |
H A D | mir_graph.h | 228 // Dataflow attributes of a basic block. 407 bool dominates_return:1; // Is a member of return extended basic block. 408 bool use_lvn:1; // Run local value numbering on this block. 449 * @brief Is ssa_reg the last SSA definition of that VR in the block? 486 BasicBlockId block; member in struct:art::SuccessorBlockInfo 499 * @param mir_graph The MIRGraph used to get the basic block during iteration. 563 /* Find existing block */ 1048 void DoDFSPreOrderSSARename(BasicBlock* block); 1075 * source basic block of a backedge and being dominated by the target basic 1076 * block o [all...] |