Lines Matching refs:block

29   HBasicBlock* block = branch_targets_[store_dex_pc];
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 if the last instruction cannot fall through.
93 // Store the block under dex_pc of the current key at the switch data
100 // End the basic block after MOVE_EXCEPTION. This simplifies the later
101 // stage of TryBoundary-block insertion.
121 HBasicBlock* block = graph_->GetEntryBlock();
122 graph_->AddBlock(block);
128 // Check if this dex_pc address starts a new basic block.
131 if (block != nullptr) {
132 // Last instruction did not end its basic block but a new one starts here.
133 // It must have been a block falling through into the next one.
134 block->AddSuccessor(next_block);
136 block = next_block;
138 graph_->AddBlock(block);
141 if (block == nullptr) {
149 DCHECK(!ContainsElement(throwing_blocks_, block));
151 throwing_blocks_.push_back(block);
156 block->AddSuccessor(GetBlockAt(target_dex_pc));
158 block->AddSuccessor(graph_->GetExitBlock());
163 block->AddSuccessor(GetBlockAt(target_dex_pc));
168 block->AddSuccessor(next_case_block);
169 block = next_case_block;
170 graph_->AddBlock(block);
174 // Remaining code only applies to instructions which end their basic block.
180 block->AddSuccessor(GetBlockAt(next_dex_pc));
183 // The basic block ends here. Do not add any more instructions.
184 block = nullptr;
190 // Returns the TryItem stored for `block` or nullptr if there is no info for it.
192 HBasicBlock* block,
194 auto iterator = try_block_info.find(block->GetBlockId());
224 // Verifier guarantees that if a catch block begins with MOVE_EXCEPTION then
228 // Normal control-flow edges have already been created. Since block's list of
233 // The catch block has normal predecessors but we do not know which are live
245 // the block's pointer but rather its id to ensure deterministic iteration.
251 for (HBasicBlock* block : graph_->GetBlocks()) {
252 if (block->GetDexPc() == kNoDexPc) {
257 // throwing instructions. In that case we simply assume that the block is
260 if (ContainsElement(throwing_blocks_, block)) {
261 // Try to find a TryItem covering the block.
262 const int32_t try_item_idx = DexFile::FindTryItem(code_item_, block->GetDexPc());
264 // Block throwing and in a TryItem. Store the try block information.
265 try_block_info.Put(block->GetBlockId(), DexFile::GetTryItems(code_item_, try_item_idx));
270 // Map from a handler dex_pc to the corresponding catch block.
283 // Catch block already processed.
287 // Check if we should create an artifical landing pad for the catch block.
288 // We create one if the catch block is also a try block because we do not
290 // We also create one if the block might have normal predecessors so as to
310 // least one predecessor is not covered by the same TryItem as the try block.
311 // We do not split each edge separately, but rather create one boundary block
318 // boundary block.
336 // If the successor is a try block, all of its predecessors must be
338 // created a non-throwing boundary block.