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

Side by Side Diff: src/compiler/simplified-lowering.cc

Issue 964843002: [turbofan] Properly unlink dead nodes in simplified lowering. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | test/cctest/compiler/test-simplified-lowering.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/simplified-lowering.h" 5 #include "src/compiler/simplified-lowering.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after
1049 // same. 1049 // same.
1050 node->ReplaceUses(replacement); 1050 node->ReplaceUses(replacement);
1051 } else { 1051 } else {
1052 // Otherwise, we are replacing a node with a representation change. 1052 // Otherwise, we are replacing a node with a representation change.
1053 // Such a substitution must be done after all lowering is done, because 1053 // Such a substitution must be done after all lowering is done, because
1054 // changing the type could confuse the representation change 1054 // changing the type could confuse the representation change
1055 // insertion for uses of the node. 1055 // insertion for uses of the node.
1056 replacements_.push_back(node); 1056 replacements_.push_back(node);
1057 replacements_.push_back(replacement); 1057 replacements_.push_back(replacement);
1058 } 1058 }
1059 // TODO(titzer) node->RemoveAllInputs(); // Node is now dead. 1059 node->RemoveAllInputs(); // Node is now dead.
1060 } 1060 }
1061 1061
1062 void PrintUseInfo(Node* node) { 1062 void PrintUseInfo(Node* node) {
1063 TRACE(("#%d:%-20s ", node->id(), node->op()->mnemonic())); 1063 TRACE(("#%d:%-20s ", node->id(), node->op()->mnemonic()));
1064 PrintInfo(GetUseInfo(node)); 1064 PrintInfo(GetUseInfo(node));
1065 TRACE(("\n")); 1065 TRACE(("\n"));
1066 } 1066 }
1067 1067
1068 void PrintInfo(MachineTypeUnion info) { 1068 void PrintInfo(MachineTypeUnion info) {
1069 if (FLAG_trace_representation) { 1069 if (FLAG_trace_representation) {
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
1573 1573
1574 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) { 1574 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) {
1575 node->set_op(machine()->IntLessThanOrEqual()); 1575 node->set_op(machine()->IntLessThanOrEqual());
1576 node->ReplaceInput(0, StringComparison(node, true)); 1576 node->ReplaceInput(0, StringComparison(node, true));
1577 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); 1577 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL));
1578 } 1578 }
1579 1579
1580 } // namespace compiler 1580 } // namespace compiler
1581 } // namespace internal 1581 } // namespace internal
1582 } // namespace v8 1582 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/cctest/compiler/test-simplified-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698