Searched refs:block (Results 1 - 25 of 79) sorted by relevance

1234

/art/compiler/optimizing/
H A Dcommon_dominator.h36 // Create a finder starting with a given block.
37 explicit CommonDominator(HBasicBlock* block) argument
38 : dominator_(block), chain_length_(ChainLength(block)) {
41 // Update the common dominator with another block.
42 void Update(HBasicBlock* block) { argument
43 DCHECK(block != nullptr);
45 dominator_ = block;
46 chain_length_ = ChainLength(block);
51 if (block
82 ChainLength(HBasicBlock* block) argument
[all...]
H A Dside_effects_analysis.cc29 for (HBasicBlock* block : graph_->GetReversePostOrder()) {
30 SideEffects effects = GetBlockEffects(block);
32 if (block->IsLoopHeader()) {
33 effects = GetLoopEffects(block);
40 for (HBasicBlock* block : graph_->GetPostOrder()) {
42 // Update `effects` with the side effects of all instructions in this block.
43 for (HInstructionIterator inst_it(block->GetInstructions()); !inst_it.Done();
48 // more information to side-effects of this block.
54 block_effects_[block->GetBlockId()] = effects;
56 if (block
[all...]
H A Ddead_code_elimination.cc34 HBasicBlock* block = worklist.back(); local
36 int block_id = block->GetBlockId();
39 ArrayRef<HBasicBlock* const> live_successors(block->GetSuccessors());
40 HInstruction* last_instruction = block->GetLastInstruction();
67 DCHECK_EQ(live_successors[0], block->GetSuccessors()[switch_index]);
85 void HDeadCodeElimination::MaybeRecordDeadBlock(HBasicBlock* block) { argument
88 block->GetPhis().CountSize() + block->GetInstructions().CountSize());
171 // going directly to a catch block, we cannot support it at the
173 // catch block'
290 HBasicBlock* block = graph_->GetReversePostOrder()[i]; local
[all...]
H A Dlinear_order.cc37 static void AddToListForLinearization(ArenaVector<HBasicBlock*>* worklist, HBasicBlock* block) { argument
38 HLoopInformation* block_loop = block->GetLoopInformation();
46 // The block can be processed immediately.
50 worklist->insert(insert_pos.base(), block);
62 for (HBasicBlock* block : *linear_order) {
63 if (loop->Contains(*block)) {
65 if (found_blocks == 1u && block != header) {
66 // First block is not the header.
68 } else if (found_blocks == num_blocks && !loop->IsBackEdge(*block)) {
69 // Last block i
[all...]
H A Dblock_builder.cc29 HBasicBlock* block = branch_targets_[store_dex_pc]; local
30 if (block == nullptr) {
31 block = new (arena_) HBasicBlock(graph_, semantic_dex_pc);
32 branch_targets_[store_dex_pc] = block;
34 DCHECK_EQ(block->GetDexPc(), semantic_dex_pc);
35 return block;
39 // Create the first block for the dex instructions, single successor of the entry block.
44 // places where the program might fall through into/out of the a block and
53 // TODO: Do not create block i
121 HBasicBlock* block = graph_->GetEntryBlock(); local
191 GetTryItem( HBasicBlock* block, const ArenaSafeMap<uint32_t, const DexFile::TryItem*>& try_block_info) argument
[all...]
H A Dselect_generator.cc23 // Returns true if `block` has only one predecessor, ends with a Goto and
26 static bool IsSimpleBlock(HBasicBlock* block) { argument
27 if (block->GetPredecessors().size() != 1u) {
30 DCHECK(block->GetPhis().IsEmpty());
33 for (HInstructionIterator it(block->GetInstructions()); !it.Done(); it.Advance()) {
54 // Returns nullptr if `block` has either no phis or there is more than one phi
56 static HPhi* GetSingleChangedPhi(HBasicBlock* block, size_t index1, size_t index2) { argument
60 for (HInstructionIterator it(block->GetPhis()); !it.Done(); it.Advance()) {
77 // the selection pattern empties a branch block of another occurrence.
79 for (HBasicBlock* block
[all...]
H A Dcha_guard_optimization.cc49 void VisitBasicBlock(HBasicBlock* block) OVERRIDE;
60 // Record if each block has any CHA guard. It's updated during the
75 void CHAGuardVisitor::VisitBasicBlock(HBasicBlock* block) { argument
80 HInstructionIterator it(block->GetInstructions());
89 HBasicBlock* block = flag->GetBlock(); local
100 block->RemoveInstruction(deopt);
101 block->RemoveInstruction(compare);
102 block->RemoveInstruction(flag);
134 // plus a (partial) linear search within one block for each guard.
136 // biggest block plu
181 HBasicBlock* block = flag->GetBlock(); local
[all...]
H A Dgvn.cc366 // Per-block GVN. Will also update the ValueSet of the dominated and
368 void VisitBasicBlock(HBasicBlock* block);
374 ValueSet* FindSetFor(HBasicBlock* block) const {
375 ValueSet* result = sets_[block->GetBlockId()];
376 DCHECK(result != nullptr) << "Could not find set for block B" << block->GetBlockId();
380 void AbandonSetFor(HBasicBlock* block) { argument
381 DCHECK(sets_[block->GetBlockId()] != nullptr)
382 << "Block B" << block->GetBlockId() << " expected to have a set";
383 sets_[block
419 VisitBasicBlock(HBasicBlock* block) argument
534 FindVisitedBlockWithRecyclableSet( HBasicBlock* block, const ValueSet& reference_set) const argument
[all...]
H A Dgvn_test.cc42 HBasicBlock* block = new (&allocator) HBasicBlock(graph); local
43 graph->AddBlock(block);
44 entry->AddSuccessor(block);
46 block->AddInstruction(new (&allocator) HInstanceFieldGet(parameter,
55 block->AddInstruction(new (&allocator) HInstanceFieldGet(parameter,
64 HInstruction* to_remove = block->GetLastInstruction();
65 block->AddInstruction(new (&allocator) HInstanceFieldGet(parameter,
74 HInstruction* different_offset = block->GetLastInstruction();
76 block->AddInstruction(new (&allocator) HInstanceFieldSet(parameter,
86 block
126 HBasicBlock* block = new (&allocator) HBasicBlock(graph); local
209 HBasicBlock* block = new (&allocator) HBasicBlock(graph); local
[all...]
H A Dpretty_printer.h73 void VisitBasicBlock(HBasicBlock* block) OVERRIDE {
75 PrintInt(block->GetBlockId());
76 const ArenaVector<HBasicBlock*>& predecessors = block->GetPredecessors();
85 const ArenaVector<HBasicBlock*>& successors = block->GetSuccessors();
95 HGraphVisitor::VisitBasicBlock(block);
127 void VisitBasicBlock(HBasicBlock* block) OVERRIDE {
128 current_block_ = block;
129 HPrettyPrinter::VisitBasicBlock(block);
H A Dssa_liveness_analysis_test.cc45 // Create entry block.
52 HBasicBlock* CreateSuccessor(HBasicBlock* block) { argument
53 HGraph* graph = block->GetGraph();
56 block->AddSuccessor(successor);
75 HBasicBlock* block = CreateSuccessor(entry_); local
77 block->AddInstruction(ret);
78 block->AddInstruction(new (&allocator_) HExit());
107 HBasicBlock* block = CreateSuccessor(entry_); local
109 block->AddInstruction(null_check);
118 block
177 HBasicBlock* block = CreateSuccessor(entry_); local
[all...]
H A Dgraph_test.cc39 HBasicBlock* block = new (allocator) HBasicBlock(graph); local
40 graph->AddBlock(block);
42 block->AddInstruction(got);
43 return block;
47 HBasicBlock* block = createGotoBlock(graph, allocator); local
48 graph->SetEntryBlock(block);
49 return block;
53 HBasicBlock* block = new (allocator) HBasicBlock(graph); local
54 graph->AddBlock(block);
56 block
61 HBasicBlock* block = new (allocator) HBasicBlock(graph); local
291 HBasicBlock* block = createGotoBlock(graph, &allocator); local
[all...]
H A Dgraph_checker.cc36 static bool IsExitTryBoundaryIntoExitBlock(HBasicBlock* block) { argument
37 if (!block->IsSingleTryBoundary()) {
41 HTryBoundary* boundary = block->GetLastInstruction()->AsTryBoundary();
42 return block->GetPredecessors().size() == 1u &&
47 void GraphChecker::VisitBasicBlock(HBasicBlock* block) { argument
48 current_block_ = block;
50 // Check consistency with respect to predecessors of `block`.
54 sorted_predecessors.assign(block->GetPredecessors().begin(), block->GetPredecessors().end());
63 std::count(p->GetSuccessors().begin(), p->GetSuccessors().end(), block);
872 HBasicBlock* block = instruction->GetBlock(); local
1002 HBasicBlock* block = instruction->GetBlock(); local
[all...]
H A Dssa_liveness_analysis.cc39 // Each instruction gets a lifetime position, and a block gets a lifetime
41 // the block they are in. Phi instructions have the lifetime start of their block as
48 for (HBasicBlock* block : graph_->GetLinearOrder()) {
49 block->SetLifetimeStart(lifetime_position);
51 for (HInstructionIterator inst_it(block->GetPhis()); !inst_it.Done(); inst_it.Advance()) {
65 // Add a null marker to notify we are starting a block.
68 for (HInstructionIterator inst_it(block->GetInstructions()); !inst_it.Done();
84 block->SetLifetimeEnd(lifetime_position);
90 for (HBasicBlock* block
273 UpdateLiveOut(const HBasicBlock& block) argument
286 UpdateLiveIn(const HBasicBlock& block) argument
341 HBasicBlock* block = liveness.GetBlockFromPosition(GetStart() / 2); local
[all...]
H A Dside_effects_analysis.h36 SideEffects GetLoopEffects(HBasicBlock* block) const;
37 SideEffects GetBlockEffects(HBasicBlock* block) const;
56 // of the instructions in the block.
H A Ddead_code_elimination.h39 void MaybeRecordDeadBlock(HBasicBlock* block);
H A Doptimizing_unit_test.h65 for (HBasicBlock* block : graph->GetBlocks()) {
66 if (block != nullptr) {
67 if (block->GetLoopInformation() != nullptr) {
68 block->GetLoopInformation()->SetSuspendCheck(nullptr);
70 for (HInstructionIterator it(block->GetInstructions()); !it.Done(); it.Advance()) {
H A Dloop_optimization.h117 bool CanVectorize(LoopNode* node, HBasicBlock* block, int64_t trip_count);
118 void Vectorize(LoopNode* node, HBasicBlock* block, HBasicBlock* exit, int64_t trip_count);
120 HBasicBlock* block,
150 bool TrySetSimpleLoopHeader(HBasicBlock* block);
151 bool IsEmptyBody(HBasicBlock* block);
160 HBasicBlock* block);
163 HBasicBlock* block,
H A Dcode_sinking.cc121 static void AddInputs(HBasicBlock* block, argument
125 for (HInstructionIterator it(block->GetPhis()); !it.Done(); it.Advance()) {
128 for (HInstructionIterator it(block->GetInstructions()); !it.Done(); it.Advance()) {
159 // Find the target block.
164 HBasicBlock* block = user->GetBlock(); local
166 // Special case phis by taking the incoming block for regular ones,
168 block = user->AsPhi()->IsCatchPhi()
169 ? block->GetDominator()
170 : block->GetPredecessors()[use.GetIndex()];
172 finder.Update(block);
[all...]
H A Dinduction_var_range.h88 * generated in given block and graph and are returned in the output parameters lower and
94 * block:
103 HBasicBlock* block,
109 * given block and graph. Returns generated taken-test.
113 HInstruction* GenerateTakenTest(HInstruction* context, HGraph* graph, HBasicBlock* block);
123 * Code is generated in given block and graph. Returns generated last value.
127 HInstruction* GenerateLastValue(HInstruction* instruction, HGraph* graph, HBasicBlock* block);
169 * Generates the trip count expression for the given loop. Code is generated in given block
173 HInstruction* GenerateTripCount(HLoopInformation* loop, HGraph* graph, HBasicBlock* block);
268 HBasicBlock* block,
[all...]
H A Dlicm.cc23 static bool IsPhiOf(HInstruction* instruction, HBasicBlock* block) { argument
24 return instruction->IsPhi() && instruction->GetBlock() == block;
94 for (HBasicBlock* block : graph_->GetPostOrder()) {
95 if (!block->IsLoopHeader()) {
100 HLoopInformation* loop_info = block->GetLoopInformation();
101 SideEffects loop_effects = side_effects_.GetLoopEffects(block);
H A Dnodes.cc49 void HGraph::AddBlock(HBasicBlock* block) { argument
50 block->SetBlockId(blocks_.size());
51 blocks_.push_back(block);
58 // Nodes that we're currently visiting, indexed by block id.
60 // Number of successors visited from a given node, indexed by block id.
113 HBasicBlock* block = blocks_[i]; local
114 if (block == nullptr) continue;
115 DCHECK(block->GetPhis().IsEmpty()) << "Phis are not inserted at this stage";
116 for (HInstructionIterator it(block->GetInstructions()); !it.Done(); it.Advance()) {
126 HBasicBlock* block local
210 UpdateDominatorOfSuccessor(HBasicBlock* block, HBasicBlock* successor) argument
307 SplitEdge(HBasicBlock* block, HBasicBlock* successor) argument
316 SplitCriticalEdge(HBasicBlock* block, HBasicBlock* successor) argument
407 HBasicBlock* block = blocks_[block_id]; local
564 Add(HBasicBlock* block) argument
568 Remove(HBasicBlock* block) argument
572 PopulateRecursive(HBasicBlock* block) argument
592 PopulateIrreducibleRecursive(HBasicBlock* block, ArenaBitVector* finalized) argument
697 HBasicBlock* block = header_->GetPredecessors()[0]; local
732 DominatesAllBackEdges(HBasicBlock* block) argument
800 Add(HInstructionList* instruction_list, HBasicBlock* block, HInstruction* instruction) argument
856 Remove(HInstructionList* instruction_list, HBasicBlock* block, HInstruction* instruction, bool ensure_safety) argument
1039 HBasicBlock* block = GetBlock(); local
1177 VisitBasicBlock(HBasicBlock* block) argument
1591 HasOnlyOneInstruction(const HBasicBlock& block) argument
1977 DeleteDeadEmptyBlock(HBasicBlock* block) argument
1995 UpdateLoopAndTryInformationOfNewBlock(HBasicBlock* block, HBasicBlock* reference, bool replace_if_back_edge) argument
[all...]
H A Dfind_loops_test.cc41 for (HBasicBlock* block : graph->GetBlocks()) {
42 ASSERT_EQ(block->GetLoopInformation(), nullptr);
54 for (HBasicBlock* block : graph->GetBlocks()) {
55 ASSERT_EQ(block->GetLoopInformation(), nullptr);
70 for (HBasicBlock* block : graph->GetBlocks()) {
71 ASSERT_EQ(block->GetLoopInformation(), nullptr);
87 for (HBasicBlock* block : graph->GetBlocks()) {
88 ASSERT_EQ(block->GetLoopInformation(), nullptr);
102 for (HBasicBlock* block : graph->GetBlocks()) {
103 ASSERT_EQ(block
113 HBasicBlock* block = graph->GetBlocks()[block_id]; local
[all...]
/art/runtime/base/
H A Dscoped_flock.h56 bool block,
59 // Calls Init(filename, flags, block, true, error_msg);
60 bool Init(const char* filename, int flags, bool block, std::string* error_msg);
H A Dscoped_flock.cc35 bool ScopedFlock::Init(const char* filename, int flags, bool block, std::string* error_msg) { argument
36 return Init(filename, flags, block, true, error_msg);
41 bool block,
56 int operation = block ? LOCK_EX : (LOCK_EX | LOCK_NB);
59 // File is locked by someone else and we are required not to block;
77 if (block) {
82 // semantics. Thus, if we are not require to block return failure when racing.
88 if (block) {
39 Init(const char* filename, int flags, bool block, bool flush_on_close, std::string* error_msg) argument

Completed in 216 milliseconds

1234