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

Side by Side Diff: src/compiler/graph-reducer.cc

Issue 1849603002: [turbofan] Effect linearization after representation inference. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Tweaks Created 4 years, 8 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 | « src/compiler/effect-control-linearizer.cc ('k') | src/compiler/pipeline.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 <functional> 5 #include <functional>
6 #include <limits> 6 #include <limits>
7 7
8 #include "src/compiler/graph.h" 8 #include "src/compiler/graph.h"
9 #include "src/compiler/graph-reducer.h" 9 #include "src/compiler/graph-reducer.h"
10 #include "src/compiler/node.h" 10 #include "src/compiler/node.h"
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 Node* const user = edge.from(); 215 Node* const user = edge.from();
216 DCHECK(!user->IsDead()); 216 DCHECK(!user->IsDead());
217 if (NodeProperties::IsControlEdge(edge)) { 217 if (NodeProperties::IsControlEdge(edge)) {
218 if (user->opcode() == IrOpcode::kIfSuccess) { 218 if (user->opcode() == IrOpcode::kIfSuccess) {
219 Replace(user, control); 219 Replace(user, control);
220 } else if (user->opcode() == IrOpcode::kIfException) { 220 } else if (user->opcode() == IrOpcode::kIfException) {
221 DCHECK_NOT_NULL(dead_); 221 DCHECK_NOT_NULL(dead_);
222 edge.UpdateTo(dead_); 222 edge.UpdateTo(dead_);
223 Revisit(user); 223 Revisit(user);
224 } else { 224 } else {
225 UNREACHABLE(); 225 DCHECK_NOT_NULL(control);
226 edge.UpdateTo(control);
227 Revisit(user);
228 // TODO(jarin) Check that the node cannot throw (otherwise, it
229 // would have to be connected via IfSuccess/IfException).
226 } 230 }
227 } else if (NodeProperties::IsEffectEdge(edge)) { 231 } else if (NodeProperties::IsEffectEdge(edge)) {
228 DCHECK_NOT_NULL(effect); 232 DCHECK_NOT_NULL(effect);
229 edge.UpdateTo(effect); 233 edge.UpdateTo(effect);
230 Revisit(user); 234 Revisit(user);
231 } else { 235 } else {
232 DCHECK_NOT_NULL(value); 236 DCHECK_NOT_NULL(value);
233 edge.UpdateTo(value); 237 edge.UpdateTo(value);
234 Revisit(user); 238 Revisit(user);
235 } 239 }
(...skipping 25 matching lines...) Expand all
261 void GraphReducer::Revisit(Node* node) { 265 void GraphReducer::Revisit(Node* node) {
262 if (state_.Get(node) == State::kVisited) { 266 if (state_.Get(node) == State::kVisited) {
263 state_.Set(node, State::kRevisit); 267 state_.Set(node, State::kRevisit);
264 revisit_.push(node); 268 revisit_.push(node);
265 } 269 }
266 } 270 }
267 271
268 } // namespace compiler 272 } // namespace compiler
269 } // namespace internal 273 } // namespace internal
270 } // namespace v8 274 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/effect-control-linearizer.cc ('k') | src/compiler/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698