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

Unified Diff: src/compiler/control-reducer.cc

Issue 851263002: [turbofan] Initial attempt to cleanup Node and related classes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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/graph-reducer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/control-reducer.cc
diff --git a/src/compiler/control-reducer.cc b/src/compiler/control-reducer.cc
index b17e59dd68361b00a69c49fd9fd49659c9003465..877d1dcd1ae0bcb1fda0801666c3e0dda3319e43 100644
--- a/src/compiler/control-reducer.cc
+++ b/src/compiler/control-reducer.cc
@@ -106,8 +106,9 @@ class ControlReducerImpl {
marked.Push(start);
marked.SetReachableFromStart(start);
- // We use a stack of (Node, UseIter) pairs to avoid O(n^2) traversal.
- typedef std::pair<Node*, UseIter> FwIter;
+ // We use a stack of (Node, Node::Uses::const_iterator) pairs to avoid
+ // O(n^2) traversal.
+ typedef std::pair<Node*, Node::Uses::const_iterator> FwIter;
ZoneVector<FwIter> fw_stack(zone_);
fw_stack.push_back(FwIter(start, start->uses().begin()));
@@ -420,8 +421,8 @@ class ControlReducerImpl {
}
Node* replacement = NULL;
- Node::Inputs inputs = node->inputs();
- for (InputIter it = inputs.begin(); n > 1; --n, ++it) {
+ auto const inputs = node->inputs();
+ for (auto it = inputs.begin(); n > 1; --n, ++it) {
Node* input = *it;
if (input->opcode() == IrOpcode::kDead) continue; // ignore dead inputs.
if (input != node && input != replacement) { // non-redundant input.
« no previous file with comments | « src/compiler/common-operator.cc ('k') | src/compiler/graph-reducer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698