Home | History | Annotate | Download | only in src

Lines Matching refs:block

127   ASSERT(phi->block() == this);
205 void HBasicBlock::Goto(HBasicBlock* block,
211 if (block->IsInlineReturnTarget()) {
217 HGoto* instr = new(zone()) HGoto(block);
310 // instructions have been added to the block (they have phis for all
331 void HBasicBlock::AddDominatedBlock(HBasicBlock* block) {
332 ASSERT(!dominated_blocks_.Contains(block));
334 // succeeding block in this list, the predecessor is before the successor.
337 dominated_blocks_[index]->block_id() < block->block_id()) {
340 dominated_blocks_.InsertAt(index, block, zone());
374 // the loop is visited in increasing block id order, if the number of
375 // non-loop-exiting successor edges at the dominator_candidate block doesn't
377 // path from the loop header to any block with higher id that doesn't go
378 // through the dominator_candidate block. In this case, the
379 // dominator_candidate block is guaranteed to dominate all blocks reachable
397 // now, it's not possible to guarantee that the current block dominates
399 // that those paths through loop that don't go through the current block
438 // Check that every block is finished.
452 void HLoopInformation::RegisterBackEdge(HBasicBlock* block) {
453 this->back_edges_.Add(block, block->zone());
454 AddBlock(block);
472 void HLoopInformation::AddBlock(HBasicBlock* block) {
473 if (block == loop_header()) return;
474 if (block->parent_loop_header() == loop_header()) return;
475 if (block->parent_loop_header() != NULL) {
476 AddBlock(block->parent_loop_header());
478 block->set_parent_loop_header(loop_header());
479 blocks_.Add(block, block->zone());
480 for (int i = 0; i < block->predecessors()->length(); ++i) {
481 AddBlock(block->predecessors()->at(i));
490 // the BitVector "reachable()" for every block that can be reached
491 // from the start block of the graph. If "dont_visit" is non-null, the given
492 // block is treated as if it would not be part of the graph. "visited_count()"
511 void PushBlock(HBasicBlock* block) {
512 if (block != NULL && block != dont_visit_ &&
513 !reachable_.Contains(block->block_id())) {
514 reachable_.Add(block->block_id());
515 stack_.Add(block, block->zone());
541 HBasicBlock* block = blocks_.at(i);
543 block->Verify();
545 // Check that every block contains at least one node and that only the last
547 HInstruction* current = block->first();
551 ASSERT(current->block() == block);
557 HBasicBlock* first = block->end()->FirstSuccessor();
558 HBasicBlock* second = block->end()->SecondSuccessor();
563 ASSERT(first->predecessors()->Contains(block));
565 ASSERT(second->predecessors()->Contains(block));
570 for (int j = 0; j < block->phis()->length(); j++) {
571 HPhi* phi = block->phis()->at(j);
577 if (block->predecessors()->length() >= 2) {
579 block->predecessors()->first()->last_environment()->ast_id();
580 for (int k = 0; k < block->predecessors()->length(); k++) {
581 HBasicBlock* predecessor = block->predecessors()->at(k);
588 // Check special property of first block to have no predecessors.
596 // Check that entry block dominator is NULL.
601 HBasicBlock* block = blocks_.at(i);
602 if (block->dominator() == NULL) {
603 // Only start block may have no dominator assigned to.
606 // Assert that block is unreachable if dominator must not be visited.
609 block->dominator());
610 ASSERT(!dominator_analyzer.reachable()->Contains(block->block_id()));
849 HBasicBlock* block = builder_->current_block();
851 block->FinishExit(builder_->New<HReturn>(value, parameter_count));
868 // Return on true. Nothing to do, just continue the false block.
870 // Deopt on false. Nothing to do except switching to the true block.
1061 // When merging from a deopt block to a continuation, resolve differences in
2110 // Block ordering was implemented with two mutually recursive methods,
2116 // Postorder(block, loop_header) : {
2117 // if (block has already been visited or is of another loop) return;
2118 // mark block as visited;
2119 // if (block is a loop header) {
2120 // VisitLoopMembers(block, loop_header);
2121 // VisitSuccessorsOfLoopHeader(block);
2123 // VisitSuccessors(block)
2125 // put block in result list;
2128 // VisitLoopMembers(block, outer_loop_header) {
2129 // foreach (block b in block loop members) {
2135 // VisitSuccessorsOfLoopMember(block, outer_loop_header) {
2136 // foreach (block b in block successors) Postorder(b, outer_loop_header)
2139 // VisitSuccessorsOfLoopHeader(block) {
2140 // foreach (block b in block successors) Postorder(b, block)
2143 // VisitSuccessors(block, loop_header) {
2144 // foreach (block b in block successors) Postorder(b, loop_header)
2161 HBasicBlock* block() { return block_; }
2166 HBasicBlock* block,
2169 return result->SetupSuccessors(zone, block, NULL, visited);
2199 HBasicBlock* block,
2202 if (block == NULL || visited->Contains(block->block_id()) ||
2203 block->parent_loop_header() != loop_header) {
2210 block_ = block;
2212 visited->Add(block->block_id());
2214 if (block->IsLoopHeader()) {
2216 loop_header_ = block;
2219 return result->SetupLoopMembers(zone, block, block->loop_information(),
2222 ASSERT(block->IsFinished());
2232 HBasicBlock* block,
2236 block_ = block;
2244 HBasicBlock* block,
2248 block_ = block;
2273 // This method is the basic block to walk up the stack.
2285 if (block()->IsLoopHeader() && block() != loop_->loop_header()) {
2288 return SetupLoopMembers(zone, block(),
2289 block()->loop_information(), loop_header_);
2336 block(), visited);
2429 HBasicBlock* block = blocks_[i];
2430 if (block->IsLoopHeader()) {
2433 block->AssignCommonDominator(block->predecessors()->first());
2434 block->AssignLoopSuccessorDominators();
2726 // property by always adding an empty block on the outgoing edges of this
2842 // Hydrogen translation of the instructions in the start block. This
2846 // the body's entry block (along with some special logic for the start
2847 // block in HInstruction::InsertAfter) seals the start block from
2851 // Make the Hydrogen instructions in the initial block into Hydrogen
2987 HBasicBlock* block = blocks()->at(block_index);
2990 for (int i = 0; i < block->phis()->length(); i++) {
2991 HPhi* phi = block->phis()->at(i);
2996 for (HInstructionIterator it(block); !it.Done(); it.Advance()) {
3083 void HOptimizedGraphBuilder::VisitBlock(Block* stmt) {
3174 HBasicBlock* block = NULL;
3177 block = current->info()->break_block();
3178 if (block == NULL) {
3179 block = current->owner()->graph()->CreateBasicBlock();
3180 current->info()->set_break_block(block);
3185 block = current->info()->continue_block();
3186 if (block == NULL) {
3187 block = current->owner()->graph()->CreateBasicBlock();
3188 current->info()->set_continue_block(block);
3193 return block;
3389 // Save the current block to use for the default or to join with the
3408 // Identify the block where normal (non-fall-through) control flow
3421 // Identify a block to emit the body into.
3450 // Create an up-to-3-way join. Use the break block if it exists since
3451 // it's already a join block.
3494 // The block for a true condition, the actual predecessor block of the
6235 // even without predecessors to the join block, we set it as the exit
6236 // block and continue by adding instructions there.
7934 // We need an extra block to maintain edge-split form.
7955 // only its control flow and side effects. We need an extra block to
9345 void HEnvironment::AddIncomingEdge(HBasicBlock* block, HEnvironment* other) {
9346 ASSERT(!block->IsLoopHeader());
9352 if (value != NULL && value->IsPhi() && value->block() == block) {
9357 ASSERT(phi->OperandCount() == block->predecessors()->length());
9362 HPhi* phi = block->AddNewPhi(i);
9364 for (int j = 0; j < block->predecessors()->length(); j++) {
9579 Tag block_tag(this, "block");