Home
last modified time | relevance | path

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

12345

/art/compiler/optimizing/
Dcommon_dominator.h37 explicit CommonDominator(HBasicBlock* block) in CommonDominator() argument
38 : dominator_(block), chain_length_(ChainLength(block)) { in CommonDominator()
42 void Update(HBasicBlock* block) { in Update() argument
43 DCHECK(block != nullptr); in Update()
45 dominator_ = block; in Update()
46 chain_length_ = ChainLength(block); in Update()
51 if (block == block2) { in Update()
54 size_t chain_length = ChainLength(block); in Update()
58 block = block->GetDominator(); in Update()
59 DCHECK(block != nullptr); in Update()
[all …]
Dside_effects_analysis.cc29 for (HBasicBlock* block : graph_->GetReversePostOrder()) { in Run()
30 SideEffects effects = GetBlockEffects(block); in Run()
32 if (block->IsLoopHeader()) { in Run()
33 effects = GetLoopEffects(block); in Run()
40 for (HBasicBlock* block : graph_->GetPostOrder()) { in Run()
43 for (HInstructionIterator inst_it(block->GetInstructions()); !inst_it.Done(); in Run()
54 block_effects_[block->GetBlockId()] = effects; in Run()
56 if (block->IsLoopHeader()) { in Run()
58 UpdateLoopEffects(block->GetLoopInformation(), effects); in Run()
59 HBasicBlock* pre_header = block->GetLoopInformation()->GetPreHeader(); in Run()
[all …]
Ddead_code_elimination.cc39 HBasicBlock* block = worklist.back(); in MarkReachableBlocks() local
41 int block_id = block->GetBlockId(); in MarkReachableBlocks()
44 ArrayRef<HBasicBlock* const> live_successors(block->GetSuccessors()); in MarkReachableBlocks()
45 HInstruction* last_instruction = block->GetLastInstruction(); in MarkReachableBlocks()
72 DCHECK_EQ(live_successors[0], block->GetSuccessors()[switch_index]); in MarkReachableBlocks()
90 void HDeadCodeElimination::MaybeRecordDeadBlock(HBasicBlock* block) { in MaybeRecordDeadBlock() argument
93 block->GetPhis().CountSize() + block->GetInstructions().CountSize()); in MaybeRecordDeadBlock()
149 static bool RemoveNonNullControlDependences(HBasicBlock* block, HBasicBlock* throws) { in RemoveNonNullControlDependences() argument
151 if (!block->EndsWithIf()) { in RemoveNonNullControlDependences()
154 HIf* ifs = block->GetLastInstruction()->AsIf(); in RemoveNonNullControlDependences()
[all …]
Dlinear_order.cc41 HBasicBlock* block) { in AddToListForLinearization() argument
42 HLoopInformation* block_loop = block->GetLoopInformation(); in AddToListForLinearization()
54 worklist->insert(insert_pos.base(), block); in AddToListForLinearization()
66 for (HBasicBlock* block : linear_order) { in IsLinearOrderWellFormed()
67 if (loop->Contains(*block)) { in IsLinearOrderWellFormed()
69 if (found_blocks == 1u && block != header) { in IsLinearOrderWellFormed()
72 } else if (found_blocks == num_blocks && !loop->IsBackEdge(*block)) { in IsLinearOrderWellFormed()
100 for (HBasicBlock* block : graph->GetReversePostOrder()) { in LinearizeGraphInternal()
101 size_t number_of_forward_predecessors = block->GetPredecessors().size(); in LinearizeGraphInternal()
102 if (block->IsLoopHeader()) { in LinearizeGraphInternal()
[all …]
Dblock_builder.cc53 HBasicBlock* block = branch_targets_[store_dex_pc]; in MaybeCreateBlockAt() local
54 if (block == nullptr) { in MaybeCreateBlockAt()
55 block = new (allocator_) HBasicBlock(graph_, semantic_dex_pc); in MaybeCreateBlockAt()
56 branch_targets_[store_dex_pc] = block; in MaybeCreateBlockAt()
58 DCHECK_EQ(block->GetDexPc(), semantic_dex_pc); in MaybeCreateBlockAt()
59 return block; in MaybeCreateBlockAt()
147 HBasicBlock* block = graph_->GetEntryBlock(); in ConnectBasicBlocks() local
148 graph_->AddBlock(block); in ConnectBasicBlocks()
163 if (block != nullptr) { in ConnectBasicBlocks()
166 block->AddSuccessor(next_block); in ConnectBasicBlocks()
[all …]
Dgvn.cc357 void VisitBasicBlock(HBasicBlock* block);
363 ValueSet* FindSetFor(HBasicBlock* block) const { in FindSetFor()
364 ValueSet* result = sets_[block->GetBlockId()]; in FindSetFor()
365 DCHECK(result != nullptr) << "Could not find set for block B" << block->GetBlockId(); in FindSetFor()
369 void AbandonSetFor(HBasicBlock* block) { in AbandonSetFor() argument
370 DCHECK(sets_[block->GetBlockId()] != nullptr) in AbandonSetFor()
371 << "Block B" << block->GetBlockId() << " expected to have a set"; in AbandonSetFor()
372 sets_[block->GetBlockId()] = nullptr; in AbandonSetFor()
377 bool WillBeReferencedAgain(HBasicBlock* block) const;
382 HBasicBlock* FindVisitedBlockWithRecyclableSet(HBasicBlock* block,
[all …]
Dssa_liveness_analysis.cc48 for (HBasicBlock* block : graph_->GetLinearOrder()) { in NumberInstructions()
49 block->SetLifetimeStart(lifetime_position); in NumberInstructions()
51 for (HInstructionIterator inst_it(block->GetPhis()); !inst_it.Done(); inst_it.Advance()) { in NumberInstructions()
68 for (HInstructionIterator inst_it(block->GetInstructions()); !inst_it.Done(); in NumberInstructions()
84 block->SetLifetimeEnd(lifetime_position); in NumberInstructions()
90 for (HBasicBlock* block : graph_->GetLinearOrder()) { in ComputeLiveness()
91 block_infos_[block->GetBlockId()] = in ComputeLiveness()
92 new (allocator_) BlockInfo(allocator_, *block, number_of_ssa_values_); in ComputeLiveness()
171 for (HBasicBlock* block : ReverseRange(graph_->GetLinearOrder())) { in ComputeLiveRanges()
172 BitVector* kill = GetKillSet(*block); in ComputeLiveRanges()
[all …]
Dgvn_test.cc40 HBasicBlock* block = new (GetAllocator()) HBasicBlock(graph); in TEST_F() local
41 graph->AddBlock(block); in TEST_F()
42 entry->AddSuccessor(block); in TEST_F()
44 block->AddInstruction(new (GetAllocator()) HInstanceFieldGet(parameter, in TEST_F()
53 block->AddInstruction(new (GetAllocator()) HInstanceFieldGet(parameter, in TEST_F()
62 HInstruction* to_remove = block->GetLastInstruction(); in TEST_F()
63 block->AddInstruction(new (GetAllocator()) HInstanceFieldGet(parameter, in TEST_F()
72 HInstruction* different_offset = block->GetLastInstruction(); in TEST_F()
74 block->AddInstruction(new (GetAllocator()) HInstanceFieldSet(parameter, in TEST_F()
84 block->AddInstruction(new (GetAllocator()) HInstanceFieldGet(parameter, in TEST_F()
[all …]
Dgraph_test.cc48 HBasicBlock* block = new (GetAllocator()) HBasicBlock(graph); in CreateGotoBlock() local
49 graph->AddBlock(block); in CreateGotoBlock()
51 block->AddInstruction(got); in CreateGotoBlock()
52 return block; in CreateGotoBlock()
56 HBasicBlock* block = CreateGotoBlock(graph); in CreateEntryBlock() local
57 graph->SetEntryBlock(block); in CreateEntryBlock()
58 return block; in CreateEntryBlock()
62 HBasicBlock* block = new (GetAllocator()) HBasicBlock(graph); in CreateReturnBlock() local
63 graph->AddBlock(block); in CreateReturnBlock()
65 block->AddInstruction(return_instr); in CreateReturnBlock()
[all …]
Dselect_generator.cc37 static bool IsSimpleBlock(HBasicBlock* block) { in IsSimpleBlock() argument
38 if (block->GetPredecessors().size() != 1u) { in IsSimpleBlock()
41 DCHECK(block->GetPhis().IsEmpty()); in IsSimpleBlock()
44 for (HInstructionIterator it(block->GetInstructions()); !it.Done(); it.Advance()) { in IsSimpleBlock()
52 instruction->AsSelect()->GetCondition()->GetBlock() == block) { in IsSimpleBlock()
76 static HPhi* GetSingleChangedPhi(HBasicBlock* block, size_t index1, size_t index2) { in GetSingleChangedPhi() argument
80 for (HInstructionIterator it(block->GetPhis()); !it.Done(); it.Advance()) { in GetSingleChangedPhi()
104 for (HBasicBlock* block : graph_->GetPostOrder()) { in Run()
105 if (!block->EndsWithIf()) continue; in Run()
108 HIf* if_instruction = block->GetLastInstruction()->AsIf(); in Run()
[all …]
Dssa_liveness_analysis_test.cc44 HBasicBlock* CreateSuccessor(HBasicBlock* block) { in CreateSuccessor() argument
45 HGraph* graph = block->GetGraph(); in CreateSuccessor()
48 block->AddSuccessor(successor); in CreateSuccessor()
62 HBasicBlock* block = CreateSuccessor(entry_); in TEST_F() local
64 block->AddInstruction(ret); in TEST_F()
65 block->AddInstruction(new (GetAllocator()) HExit()); in TEST_F()
93 HBasicBlock* block = CreateSuccessor(entry_); in TEST_F() local
95 block->AddInstruction(null_check); in TEST_F()
104 block->AddInstruction(length); in TEST_F()
106 block->AddInstruction(bounds_check); in TEST_F()
[all …]
Dcha_guard_optimization.cc49 void VisitBasicBlock(HBasicBlock* block) override;
75 void CHAGuardVisitor::VisitBasicBlock(HBasicBlock* block) { in VisitBasicBlock() argument
80 HInstructionIterator it(block->GetInstructions()); in VisitBasicBlock()
89 HBasicBlock* block = flag->GetBlock(); in RemoveGuard() local
100 block->RemoveInstruction(deopt); in RemoveGuard()
101 block->RemoveInstruction(compare); in RemoveGuard()
102 block->RemoveInstruction(flag); in RemoveGuard()
181 HBasicBlock* block = flag->GetBlock(); in HoistGuard() local
182 HLoopInformation* loop_info = block->GetLoopInformation(); in HoistGuard()
201 block->RemoveInstruction(deopt); in HoistGuard()
[all …]
Dgraph_checker.cc50 static bool IsExitTryBoundaryIntoExitBlock(HBasicBlock* block) { in IsExitTryBoundaryIntoExitBlock() argument
51 if (!block->IsSingleTryBoundary()) { in IsExitTryBoundaryIntoExitBlock()
55 HTryBoundary* boundary = block->GetLastInstruction()->AsTryBoundary(); in IsExitTryBoundaryIntoExitBlock()
56 return block->GetPredecessors().size() == 1u && in IsExitTryBoundaryIntoExitBlock()
85 void GraphChecker::VisitBasicBlock(HBasicBlock* block) { in VisitBasicBlock() argument
86 current_block_ = block; in VisitBasicBlock()
95 sorted_predecessors.assign(block->GetPredecessors().begin(), block->GetPredecessors().end()); in VisitBasicBlock()
104 std::count(p->GetSuccessors().begin(), p->GetSuccessors().end(), block); in VisitBasicBlock()
109 block->GetBlockId(), p_count_in_block_predecessors, p->GetBlockId(), in VisitBasicBlock()
110 p->GetBlockId(), block_count_in_p_successors, block->GetBlockId())); in VisitBasicBlock()
[all …]
Dnodes.cc50 void HGraph::AddBlock(HBasicBlock* block) { in AddBlock() argument
51 block->SetBlockId(blocks_.size()); in AddBlock()
52 blocks_.push_back(block); in AddBlock()
148 HBasicBlock* block = blocks_[i]; in RemoveInstructionsAsUsersFromDeadBlocks() local
149 if (block == nullptr) continue; in RemoveInstructionsAsUsersFromDeadBlocks()
150 for (HInstructionIterator it(block->GetPhis()); !it.Done(); it.Advance()) { in RemoveInstructionsAsUsersFromDeadBlocks()
153 for (HInstructionIterator it(block->GetInstructions()); !it.Done(); it.Advance()) { in RemoveInstructionsAsUsersFromDeadBlocks()
163 HBasicBlock* block = blocks_[i]; in RemoveDeadBlocks() local
164 if (block == nullptr) continue; in RemoveDeadBlocks()
166 for (HBasicBlock* successor : block->GetSuccessors()) { in RemoveDeadBlocks()
[all …]
Dpretty_printer.h73 void VisitBasicBlock(HBasicBlock* block) override { in VisitBasicBlock() argument
75 PrintInt(block->GetBlockId()); in VisitBasicBlock()
76 const ArenaVector<HBasicBlock*>& predecessors = block->GetPredecessors(); in VisitBasicBlock()
85 const ArenaVector<HBasicBlock*>& successors = block->GetSuccessors(); in VisitBasicBlock()
95 HGraphVisitor::VisitBasicBlock(block); in VisitBasicBlock()
127 void VisitBasicBlock(HBasicBlock* block) override { in VisitBasicBlock() argument
128 current_block_ = block; in VisitBasicBlock()
129 HPrettyPrinter::VisitBasicBlock(block); in VisitBasicBlock()
Dfind_loops_test.cc39 for (HBasicBlock* block : graph->GetBlocks()) { in TEST_F()
40 ASSERT_EQ(block->GetLoopInformation(), nullptr); in TEST_F()
50 for (HBasicBlock* block : graph->GetBlocks()) { in TEST_F()
51 ASSERT_EQ(block->GetLoopInformation(), nullptr); in TEST_F()
64 for (HBasicBlock* block : graph->GetBlocks()) { in TEST_F()
65 ASSERT_EQ(block->GetLoopInformation(), nullptr); in TEST_F()
79 for (HBasicBlock* block : graph->GetBlocks()) { in TEST_F()
80 ASSERT_EQ(block->GetLoopInformation(), nullptr); in TEST_F()
92 for (HBasicBlock* block : graph->GetBlocks()) { in TEST_F()
93 ASSERT_EQ(block->GetLoopInformation(), nullptr); in TEST_F()
[all …]
Dconstant_folding_test.cc740 HBasicBlock* block = new (GetAllocator()) HBasicBlock(graph_); in TEST_F() local
741 graph_->AddBlock(block); in TEST_F()
745 entry_block->AddSuccessor(block); in TEST_F()
746 block->AddSuccessor(exit_block); in TEST_F()
757 block->AddInstruction(last = new (GetAllocator()) HAbove(zero, parameter)); in TEST_F()
758 block->AddInstruction(new (GetAllocator()) HSelect(last, parameter, parameter, 0)); in TEST_F()
759 block->AddInstruction(last = new (GetAllocator()) HAbove(parameter, zero)); in TEST_F()
760 block->AddInstruction(new (GetAllocator()) HSelect(last, parameter, parameter, 0)); in TEST_F()
761 block->AddInstruction(last = new (GetAllocator()) HAboveOrEqual(zero, parameter)); in TEST_F()
762 block->AddInstruction(new (GetAllocator()) HSelect(last, parameter, parameter, 0)); in TEST_F()
[all …]
Dcode_sinking.cc144 static void AddInputs(HBasicBlock* block, in AddInputs() argument
148 for (HInstructionIterator it(block->GetPhis()); !it.Done(); it.Advance()) { in AddInputs()
151 for (HInstructionIterator it(block->GetInstructions()); !it.Done(); it.Advance()) { in AddInputs()
187 HBasicBlock* block = user->GetBlock(); in FindIdealPosition() local
191 block = user->AsPhi()->IsCatchPhi() in FindIdealPosition()
192 ? block->GetDominator() in FindIdealPosition()
193 : block->GetPredecessors()[use.GetIndex()]; in FindIdealPosition()
195 finder.Update(block); in FindIdealPosition()
277 for (HBasicBlock* block : graph_->GetPostOrder()) { in SinkCodeToUncommonBranch()
278 if (block == end_block) { in SinkCodeToUncommonBranch()
[all …]
Dinduction_var_range.cc166 static HInstruction* Insert(HBasicBlock* block, HInstruction* instruction) { in Insert() argument
167 DCHECK(block != nullptr); in Insert()
168 DCHECK(block->GetLastInstruction() != nullptr) << block->GetBlockId(); in Insert()
170 block->InsertInstructionBefore(instruction, block->GetLastInstruction()); in Insert()
255 HBasicBlock* block, in GenerateRange() argument
265 block, in GenerateRange()
278 HBasicBlock* block) { in GenerateTakenTest() argument
287 block, in GenerateTakenTest()
320 HBasicBlock* block) { in GenerateLastValue() argument
329 block, in GenerateLastValue()
[all …]
Dsuperblock_cloner.cc90 for (HBasicBlock* block : graph->GetPostOrder()) { in OrderLoopsHeadersPredecessors()
91 if (block->IsLoopHeader()) { in OrderLoopsHeadersPredecessors()
92 graph->OrderLoopHeaderPredecessors(block); in OrderLoopsHeadersPredecessors()
101 static void TraverseSubgraphForConnectivity(HBasicBlock* block, HBasicBlockSet* bb_set) { in TraverseSubgraphForConnectivity() argument
102 DCHECK(bb_set->IsBitSet(block->GetBlockId())); in TraverseSubgraphForConnectivity()
103 bb_set->ClearBit(block->GetBlockId()); in TraverseSubgraphForConnectivity()
105 for (HBasicBlock* succ : block->GetSuccessors()) { in TraverseSubgraphForConnectivity()
288 for (auto block : graph_->GetBlocks()) { in RecalculateBackEdgesInfo() local
289 if (block != nullptr) { in RecalculateBackEdgesInfo()
290 outer_loop_bb_set->SetBit(block->GetBlockId()); in RecalculateBackEdgesInfo()
[all …]
Dbounds_check_elimination_test.cc306 HBasicBlock* block = new (GetAllocator()) HBasicBlock(graph_); in TEST_F() local
307 graph_->AddBlock(block); in TEST_F()
308 entry->AddSuccessor(block); in TEST_F()
316 block->AddInstruction(null_check); in TEST_F()
317 block->AddInstruction(array_length); in TEST_F()
318 block->AddInstruction(bounds_check6); in TEST_F()
319 block->AddInstruction(array_set); in TEST_F()
327 block->AddInstruction(null_check); in TEST_F()
328 block->AddInstruction(array_length); in TEST_F()
329 block->AddInstruction(bounds_check5); in TEST_F()
[all …]
Dinduction_var_range.h103 HBasicBlock* block,
113 HInstruction* GenerateTakenTest(HInstruction* context, HGraph* graph, HBasicBlock* block);
127 HInstruction* GenerateLastValue(HInstruction* instruction, HGraph* graph, HBasicBlock* block);
190 HInstruction* GenerateTripCount(HLoopInformation* loop, HGraph* graph, HBasicBlock* block);
293 HBasicBlock* block,
304 HBasicBlock* block,
310 HBasicBlock* block,
316 HBasicBlock* block,
322 HBasicBlock* block,
329 HBasicBlock* block,
/art/test/435-try-finally-without-catch/
Dinfo.txt2 instructions with a `finally' clause but without any `catch' block,
6 block and whose result is assigned to a local value, it is smart
11 still emit a block with the exception catching and rethrowing
14 This used to be a problem for a `try' block followed by a `finally'
15 clause but with no `catch' block: in that case, the generated Dex code
16 item would list zero catch block for this method (see
20 special block(s) related to `catch'-less `try' statement(s), the
21 optimizing compiler considered this (these) as dead block(s) and
/art/libdexfile/dex/
Dcompact_offset_table.cc42 const uint8_t* block = data_begin_ + offset; in GetOffset() local
43 uint16_t bit_mask = *block; in GetOffset()
44 ++block; in GetOffset()
45 bit_mask = (bit_mask << kBitsPerByte) | *block; in GetOffset()
46 ++block; in GetOffset()
57 current_offset += DecodeUnsignedLeb128(&block); in GetOffset()
/art/libartbase/base/
Dscoped_flock.cc36 /* static */ ScopedFlock LockedFile::Open(const char* filename, int flags, bool block, in Open() argument
42 UNUSED(block); in Open()
58 int operation = block ? LOCK_EX : (LOCK_EX | LOCK_NB); in Open()
79 if (block) { in Open()
90 if (block) { in Open()

12345