Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Unified Diff: src/compiler/checkpoint-elimination.cc

Issue 2118793002: [turbofan] Broaden checkpoint elimination on returns. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-624747.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/checkpoint-elimination.cc
diff --git a/src/compiler/checkpoint-elimination.cc b/src/compiler/checkpoint-elimination.cc
index ce1a86105671088a2e0e9ec82dcad6a3573ca2a5..51ef9459e246c5fbd58634d083c035cc881da861 100644
--- a/src/compiler/checkpoint-elimination.cc
+++ b/src/compiler/checkpoint-elimination.cc
@@ -41,9 +41,9 @@ Reduction CheckpointElimination::ReduceCheckpoint(Node* node) {
Reduction CheckpointElimination::ReduceReturn(Node* node) {
DCHECK_EQ(IrOpcode::kReturn, node->opcode());
Node* effect = NodeProperties::GetEffectInput(node);
- if (effect->opcode() == IrOpcode::kCheckpoint && effect->OwnedBy(node)) {
- // Any checkpoint that is wholly owned by a {Return} node can never be used
- // for an actual bailout and can hence be cut out of the effect chain.
+ if (effect->opcode() == IrOpcode::kCheckpoint) {
+ // Any {Return} node can never be used to insert a deoptimization point,
+ // hence checkpoints can be cut out of the effect chain flowing into it.
Node* replacement = NodeProperties::GetEffectInput(effect);
NodeProperties::ReplaceEffectInput(node, replacement);
return Changed(node);
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-624747.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698