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

Unified Diff: src/compiler/loop-analysis.cc

Issue 816053002: [turbofan] First version of loop peeling. (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/loop-analysis.h ('k') | src/compiler/loop-peeling.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/loop-analysis.cc
diff --git a/src/compiler/loop-analysis.cc b/src/compiler/loop-analysis.cc
index 8a9698bd069109c030d6fc72e6bf4aa63659d33d..6b6f022e863db3a7958a535771fe00759a8ca832 100644
--- a/src/compiler/loop-analysis.cc
+++ b/src/compiler/loop-analysis.cc
@@ -1,4 +1,4 @@
-// Copyright 2013 the V8 project authors. All rights reserved.
+// Copyright 2014 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -196,8 +196,7 @@ class LoopFinderImpl {
if (node->opcode() == IrOpcode::kLoop) {
// found the loop node first.
loop_num = CreateLoopInfo(node);
- } else if (node->opcode() == IrOpcode::kPhi ||
- node->opcode() == IrOpcode::kEffectPhi) {
+ } else if (IrOpcode::IsPhiOpcode(node->opcode())) {
// found a phi first.
Node* merge = node->InputAt(node->InputCount() - 1);
if (merge->opcode() == IrOpcode::kLoop) {
@@ -235,8 +234,7 @@ class LoopFinderImpl {
// Setup loop mark for phis attached to loop header.
for (Node* use : node->uses()) {
- if (use->opcode() == IrOpcode::kPhi ||
- use->opcode() == IrOpcode::kEffectPhi) {
+ if (IrOpcode::IsPhiOpcode(use->opcode())) {
SetBackwardMark(use, loop_num);
loop_tree_->node_to_loop_num_[use->id()] = loop_num;
}
@@ -291,8 +289,7 @@ class LoopFinderImpl {
bool IsBackedge(Node* use, Edge& edge) {
if (LoopNum(use) <= 0) return false;
if (edge.index() == kAssumedLoopEntryIndex) return false;
- if (use->opcode() == IrOpcode::kPhi ||
- use->opcode() == IrOpcode::kEffectPhi) {
+ if (IrOpcode::IsPhiOpcode(use->opcode())) {
return !NodeProperties::IsControlEdge(edge);
}
return true;
« no previous file with comments | « src/compiler/loop-analysis.h ('k') | src/compiler/loop-peeling.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698