[turbofan] Introduce CheckPoint common operator.
This operator will be used to carry eager frame states, and is hooked up to the effect chain with a control dependency to avoid hosting out of control structures. R=jarin@chromium.org BUG=v8:5021 Review-Url: https://codereview.chromium.org/1993593002 Cr-Commit-Position: refs/heads/master@{#36301}
This commit is contained in:
parent
9e332635ce
commit
4e0105d876
@ -179,6 +179,7 @@ std::ostream& operator<<(std::ostream& os,
|
||||
V(Terminate, Operator::kKontrol, 0, 1, 1, 0, 0, 1) \
|
||||
V(OsrNormalEntry, Operator::kFoldable, 0, 1, 1, 0, 1, 1) \
|
||||
V(OsrLoopEntry, Operator::kFoldable, 0, 1, 1, 0, 1, 1) \
|
||||
V(CheckPoint, Operator::kKontrol, 1, 1, 1, 0, 1, 0) \
|
||||
V(BeginRegion, Operator::kNoThrow, 0, 1, 0, 0, 1, 0) \
|
||||
V(FinishRegion, Operator::kNoThrow, 1, 1, 0, 1, 1, 0)
|
||||
|
||||
|
@ -190,6 +190,7 @@ class CommonOperatorBuilder final : public ZoneObject {
|
||||
const Operator* Phi(MachineRepresentation representation,
|
||||
int value_input_count);
|
||||
const Operator* EffectPhi(int effect_input_count);
|
||||
const Operator* CheckPoint();
|
||||
const Operator* Guard(Type* type);
|
||||
const Operator* BeginRegion();
|
||||
const Operator* FinishRegion();
|
||||
|
@ -293,6 +293,15 @@ void EffectControlLinearizer::ProcessNode(Node* node, Node** effect,
|
||||
return RemoveRegionNode(node);
|
||||
}
|
||||
|
||||
// Special treatment for CheckPoint nodes.
|
||||
// TODO(epertoso): Pickup the current frame state.
|
||||
if (node->opcode() == IrOpcode::kCheckPoint) {
|
||||
// Unlink the check point; effect uses will be updated to the incoming
|
||||
// effect that is passed.
|
||||
node->Kill();
|
||||
return;
|
||||
}
|
||||
|
||||
if (node->opcode() == IrOpcode::kIfSuccess) {
|
||||
// We always schedule IfSuccess with its call, so skip it here.
|
||||
DCHECK_EQ(IrOpcode::kCall, node->InputAt(0)->opcode());
|
||||
|
@ -47,6 +47,7 @@
|
||||
V(Select) \
|
||||
V(Phi) \
|
||||
V(EffectPhi) \
|
||||
V(CheckPoint) \
|
||||
V(Guard) \
|
||||
V(BeginRegion) \
|
||||
V(FinishRegion) \
|
||||
|
@ -706,6 +706,10 @@ Type* Typer::Visitor::TypeGuard(Node* node) {
|
||||
return Type::Intersect(input_type, guard_type, zone());
|
||||
}
|
||||
|
||||
Type* Typer::Visitor::TypeCheckPoint(Node* node) {
|
||||
UNREACHABLE();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Type* Typer::Visitor::TypeBeginRegion(Node* node) {
|
||||
UNREACHABLE();
|
||||
|
@ -420,6 +420,10 @@ void Verifier::Visitor::Check(Node* node) {
|
||||
case IrOpcode::kGuard:
|
||||
// TODO(bmeurer): what are the constraints on these?
|
||||
break;
|
||||
case IrOpcode::kCheckPoint:
|
||||
// Type is empty.
|
||||
CheckNotTyped(node);
|
||||
break;
|
||||
case IrOpcode::kBeginRegion:
|
||||
// TODO(rossberg): what are the constraints on these?
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user