Index: src/compiler/ast-graph-builder.cc |
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc |
index 54b5a9c9d5079b5f7ed357543e10be4106802373..5ac0fc2187e6135a8e71f96bc5cdf0b4b3fef83f 100644 |
--- a/src/compiler/ast-graph-builder.cc |
+++ b/src/compiler/ast-graph-builder.cc |
@@ -4075,6 +4075,11 @@ void AstGraphBuilder::PrepareFrameState(Node* node, BailoutId ast_id, |
} |
void AstGraphBuilder::PrepareEagerCheckpoint(BailoutId ast_id) { |
+ if (environment()->GetEffectDependency()->opcode() == IrOpcode::kCheckpoint) { |
+ // We skip preparing a checkpoint if there already is one the current effect |
+ // dependency. This is just an optimization and not need for correctness. |
+ return; |
+ } |
if (ast_id != BailoutId::None()) { |
Node* node = NewNode(common()->Checkpoint()); |
DCHECK_EQ(IrOpcode::kDead, |