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

Unified Diff: src/compiler/common-operator-reducer.cc

Issue 2002253003: [turbofan] Properly connect DeoptimizeIf/Unless to effect chain. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix JSCallReducer Created 4 years, 7 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 | « src/compiler/common-operator.cc ('k') | src/compiler/js-call-reducer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/common-operator-reducer.cc
diff --git a/src/compiler/common-operator-reducer.cc b/src/compiler/common-operator-reducer.cc
index 2f486833c609c464d2995f466283ff42788b9c30..a6d275fd4e909db98b4358acd61ae5a2e4652f86 100644
--- a/src/compiler/common-operator-reducer.cc
+++ b/src/compiler/common-operator-reducer.cc
@@ -142,13 +142,14 @@ Reduction CommonOperatorReducer::ReduceDeoptimizeConditional(Node* node) {
Decision const decision = DecideCondition(condition);
if (decision == Decision::kUnknown) return NoChange();
if (condition_is_true == (decision == Decision::kTrue)) {
- return Replace(control);
+ ReplaceWithValue(node, dead(), effect, control);
+ } else {
+ control = graph()->NewNode(common()->Deoptimize(DeoptimizeKind::kEager),
+ frame_state, effect, control);
+ // TODO(bmeurer): This should be on the AdvancedReducer somehow.
+ NodeProperties::MergeControlToEnd(graph(), common(), control);
+ Revisit(graph()->end());
}
- control = graph()->NewNode(common()->Deoptimize(DeoptimizeKind::kEager),
- frame_state, effect, control);
- // TODO(bmeurer): This should be on the AdvancedReducer somehow.
- NodeProperties::MergeControlToEnd(graph(), common(), control);
- Revisit(graph()->end());
return Replace(dead());
}
« no previous file with comments | « src/compiler/common-operator.cc ('k') | src/compiler/js-call-reducer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698