Lines Matching defs:label

207   // Create label.
278 // binding a new label.
279 // The block_updater_successor label is a crutch to work around block updater
343 void Bind(GraphAssemblerLabel<VarCount>* label);
346 void Goto(GraphAssemblerLabel<sizeof...(Vars)>* label, Vars...);
369 void GotoIf(Node* condition, GraphAssemblerLabel<sizeof...(Vars)>* label,
378 void GotoIfNot(Node* condition, GraphAssemblerLabel<sizeof...(Vars)>* label,
383 void GotoIf(Node* condition, GraphAssemblerLabel<sizeof...(Vars)>* label,
388 void GotoIfNot(Node* condition, GraphAssemblerLabel<sizeof...(Vars)>* label,
393 // Unreachable). In that case, a new label must be bound before we can
434 void MergeState(GraphAssemblerLabel<sizeof...(Vars)>* label, Vars... vars);
558 void GraphAssembler::MergeState(GraphAssemblerLabel<sizeof...(Vars)>* label,
562 const int merged_count = static_cast<int>(label->merged_count_);
566 const bool is_loop_exit = label->loop_nesting_level_ != loop_nesting_level_;
572 DCHECK(!label->IsLoop());
574 DCHECK_EQ(label->loop_nesting_level_, loop_nesting_level_ - 1);
589 if (label->IsLoop()) {
591 DCHECK(!label->IsBound());
592 label->control_ =
594 label->effect_ = graph()->NewNode(common()->EffectPhi(2), effect(),
595 effect(), label->control_);
596 Node* terminate = graph()->NewNode(common()->Terminate(), label->effect_,
597 label->control_);
600 label->bindings_[i] =
601 graph()->NewNode(common()->Phi(label->representations_[i], 2),
602 var_array[i], var_array[i], label->control_);
605 DCHECK(label->IsBound());
607 label->control_->ReplaceInput(1, control());
608 label->effect_->ReplaceInput(1, effect());
610 label->bindings_[i]->ReplaceInput(1, var_array[i]);
615 DCHECK(!label->IsLoop());
616 DCHECK(!label->IsBound());
619 label->control_ = control();
620 label->effect_ = effect();
622 label->bindings_[i] = var_array[i];
626 label->control_ =
627 graph()->NewNode(common()->Merge(2), label->control_, control());
628 label->effect_ = graph()->NewNode(common()->EffectPhi(2), label->effect_,
629 effect(), label->control_);
631 label->bindings_[i] = graph()->NewNode(
632 common()->Phi(label->representations_[i], 2), label->bindings_[i],
633 var_array[i], label->control_);
637 DCHECK_EQ(IrOpcode::kMerge, label->control_->opcode());
638 label->control_->AppendInput(graph()->zone(), control());
639 NodeProperties::ChangeOp(label->control_,
642 DCHECK_EQ(IrOpcode::kEffectPhi, label->effect_->opcode());
643 label->effect_->ReplaceInput(merged_count, effect());
644 label->effect_->AppendInput(graph()->zone(), label->control_);
645 NodeProperties::ChangeOp(label->effect_,
649 DCHECK_EQ(IrOpcode::kPhi, label->bindings_[i]->opcode());
650 label->bindings_[i]->ReplaceInput(merged_count, var_array[i]);
651 label->bindings_[i]->AppendInput(graph()->zone(), label->control_);
653 label->bindings_[i],
654 common()->Phi(label->representations_[i], merged_count + 1));
655 if (NodeProperties::IsTyped(label->bindings_[i])) {
657 Type old_type = NodeProperties::GetType(label->bindings_[i]);
660 NodeProperties::SetType(label->bindings_[i], new_type);
665 label->merged_count_++;
669 void GraphAssembler::Bind(GraphAssemblerLabel<VarCount>* label) {
672 DCHECK_LT(0, label->merged_count_);
673 DCHECK_EQ(label->loop_nesting_level_, loop_nesting_level_);
675 control_ = label->control_;
676 effect_ = label->effect_;
678 label->SetBound();
680 if (label->merged_count_ > 1 || label->IsLoop()) {
681 AddNode(label->control_);
682 AddNode(label->effect_);
684 AddNode(label->bindings_[i]);
734 void GraphAssembler::Goto(GraphAssemblerLabel<sizeof...(Vars)>* label,
738 MergeState(label, vars...);
746 GraphAssemblerLabel<sizeof...(Vars)>* label,
751 MergeState(label, vars...);
758 GraphAssemblerLabel<sizeof...(Vars)>* label,
763 MergeState(label, vars...);
770 GraphAssemblerLabel<sizeof...(Vars)>* label,
773 label->IsDeferred() ? BranchHint::kFalse : BranchHint::kNone;
774 return GotoIf(condition, label, hint, vars...);
779 GraphAssemblerLabel<sizeof...(Vars)>* label,
781 BranchHint hint = label->IsDeferred() ? BranchHint::kTrue : BranchHint::kNone;
782 return GotoIfNot(condition, label, hint, vars...);