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

Unified Diff: src/compiler/simplified-lowering.cc

Issue 2101943005: [turbofan] Always defer replacement in simplified lowering. (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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/simplified-lowering.cc
diff --git a/src/compiler/simplified-lowering.cc b/src/compiler/simplified-lowering.cc
index b36b777224b4fb949fc5eee5216ac462b2d2299b..a6717fb1001847a1585e96c3119bcc3132201442 100644
--- a/src/compiler/simplified-lowering.cc
+++ b/src/compiler/simplified-lowering.cc
@@ -2102,20 +2102,9 @@ class RepresentationSelector {
DCHECK_EQ(0, node->op()->ControlInputCount());
}
- if (replacement->id() < count_ &&
- GetUpperBound(node)->Is(GetUpperBound(replacement)) &&
- TypeOf(node)->Is(TypeOf(replacement))) {
- // Replace with a previously existing node eagerly only if the type is the
- // same.
- node->ReplaceUses(replacement);
- } else {
- // Otherwise, we are replacing a node with a representation change.
- // Such a substitution must be done after all lowering is done, because
- // changing the type could confuse the representation change
- // insertion for uses of the node.
- replacements_.push_back(node);
- replacements_.push_back(replacement);
- }
+ replacements_.push_back(node);
+ replacements_.push_back(replacement);
+
node->NullAllInputs(); // Node is now dead.
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698