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

Side by Side 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, 5 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 | no next file » | 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/address-map.h" 9 #include "src/address-map.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 2084 matching lines...) Expand 10 before | Expand all | Expand 10 after
2095 if (node->op()->EffectInputCount() > 0) { 2095 if (node->op()->EffectInputCount() > 0) {
2096 DCHECK_LT(0, node->op()->ControlInputCount()); 2096 DCHECK_LT(0, node->op()->ControlInputCount());
2097 // Disconnect the node from effect and control chains. 2097 // Disconnect the node from effect and control chains.
2098 Node* control = NodeProperties::GetControlInput(node); 2098 Node* control = NodeProperties::GetControlInput(node);
2099 Node* effect = NodeProperties::GetEffectInput(node); 2099 Node* effect = NodeProperties::GetEffectInput(node);
2100 ReplaceEffectControlUses(node, effect, control); 2100 ReplaceEffectControlUses(node, effect, control);
2101 } else { 2101 } else {
2102 DCHECK_EQ(0, node->op()->ControlInputCount()); 2102 DCHECK_EQ(0, node->op()->ControlInputCount());
2103 } 2103 }
2104 2104
2105 if (replacement->id() < count_ && 2105 replacements_.push_back(node);
2106 GetUpperBound(node)->Is(GetUpperBound(replacement)) && 2106 replacements_.push_back(replacement);
2107 TypeOf(node)->Is(TypeOf(replacement))) { 2107
2108 // Replace with a previously existing node eagerly only if the type is the
2109 // same.
2110 node->ReplaceUses(replacement);
2111 } else {
2112 // Otherwise, we are replacing a node with a representation change.
2113 // Such a substitution must be done after all lowering is done, because
2114 // changing the type could confuse the representation change
2115 // insertion for uses of the node.
2116 replacements_.push_back(node);
2117 replacements_.push_back(replacement);
2118 }
2119 node->NullAllInputs(); // Node is now dead. 2108 node->NullAllInputs(); // Node is now dead.
2120 } 2109 }
2121 2110
2122 void PrintOutputInfo(NodeInfo* info) { 2111 void PrintOutputInfo(NodeInfo* info) {
2123 if (FLAG_trace_representation) { 2112 if (FLAG_trace_representation) {
2124 OFStream os(stdout); 2113 OFStream os(stdout);
2125 os << info->representation(); 2114 os << info->representation();
2126 } 2115 }
2127 } 2116 }
2128 2117
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after
3108 isolate(), graph()->zone(), callable.descriptor(), 0, flags, 3097 isolate(), graph()->zone(), callable.descriptor(), 0, flags,
3109 Operator::kNoProperties); 3098 Operator::kNoProperties);
3110 to_number_operator_.set(common()->Call(desc)); 3099 to_number_operator_.set(common()->Call(desc));
3111 } 3100 }
3112 return to_number_operator_.get(); 3101 return to_number_operator_.get();
3113 } 3102 }
3114 3103
3115 } // namespace compiler 3104 } // namespace compiler
3116 } // namespace internal 3105 } // namespace internal
3117 } // namespace v8 3106 } // namespace v8
OLDNEW
« 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