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

Side by Side Diff: src/compiler/verifier.cc

Issue 809333002: [turbofan] Implement OSR for outer loops. (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 unified diff | Download patch
« no previous file with comments | « src/compiler/typer.cc ('k') | src/compiler/x64/code-generator-x64.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/verifier.h" 5 #include "src/compiler/verifier.h"
6 6
7 #include <deque> 7 #include <deque>
8 #include <queue> 8 #include <queue>
9 #include <sstream> 9 #include <sstream>
10 #include <string> 10 #include <string>
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 // TODO(rossberg): what are the constraints on these? 240 // TODO(rossberg): what are the constraints on these?
241 // Type is empty. 241 // Type is empty.
242 CheckNotTyped(node); 242 CheckNotTyped(node);
243 break; 243 break;
244 case IrOpcode::kTerminate: 244 case IrOpcode::kTerminate:
245 // Type is empty. 245 // Type is empty.
246 CheckNotTyped(node); 246 CheckNotTyped(node);
247 CHECK_EQ(1, control_count); 247 CHECK_EQ(1, control_count);
248 CHECK_EQ(input_count, 1 + effect_count); 248 CHECK_EQ(input_count, 1 + effect_count);
249 break; 249 break;
250 case IrOpcode::kOsrNormalEntry:
251 case IrOpcode::kOsrLoopEntry:
252 // Osr entries have
253 CHECK_EQ(1, effect_count);
254 CHECK_EQ(1, control_count);
255 // Type is empty.
256 CheckNotTyped(node);
257 break;
250 258
251 // Common operators 259 // Common operators
252 // ---------------- 260 // ----------------
253 case IrOpcode::kParameter: { 261 case IrOpcode::kParameter: {
254 // Parameters have the start node as inputs. 262 // Parameters have the start node as inputs.
255 CHECK_EQ(1, input_count); 263 CHECK_EQ(1, input_count);
256 CHECK_EQ(IrOpcode::kStart, 264 CHECK_EQ(IrOpcode::kStart,
257 NodeProperties::GetValueInput(node, 0)->opcode()); 265 NodeProperties::GetValueInput(node, 0)->opcode());
258 // Parameter has an input that produces enough values. 266 // Parameter has an input that produces enough values.
259 int index = OpParameter<int>(node); 267 int index = OpParameter<int>(node);
(...skipping 30 matching lines...) Expand all
290 CHECK_EQ(0, input_count); 298 CHECK_EQ(0, input_count);
291 // Type can be anything represented as a heap pointer. 299 // Type can be anything represented as a heap pointer.
292 CheckUpperIs(node, Type::TaggedPointer()); 300 CheckUpperIs(node, Type::TaggedPointer());
293 break; 301 break;
294 case IrOpcode::kExternalConstant: 302 case IrOpcode::kExternalConstant:
295 // Constants have no inputs. 303 // Constants have no inputs.
296 CHECK_EQ(0, input_count); 304 CHECK_EQ(0, input_count);
297 // Type is considered internal. 305 // Type is considered internal.
298 CheckUpperIs(node, Type::Internal()); 306 CheckUpperIs(node, Type::Internal());
299 break; 307 break;
308 case IrOpcode::kOsrValue:
309 // OSR values have a value and a control input.
310 CHECK_EQ(1, control_count);
311 CHECK_EQ(1, input_count);
312 // Type is merged from other values in the graph and could be any.
313 CheckUpperIs(node, Type::Any());
314 break;
300 case IrOpcode::kProjection: { 315 case IrOpcode::kProjection: {
301 // Projection has an input that produces enough values. 316 // Projection has an input that produces enough values.
302 int index = static_cast<int>(OpParameter<size_t>(node->op())); 317 int index = static_cast<int>(OpParameter<size_t>(node->op()));
303 Node* input = NodeProperties::GetValueInput(node, 0); 318 Node* input = NodeProperties::GetValueInput(node, 0);
304 CHECK_GT(input->op()->ValueOutputCount(), index); 319 CHECK_GT(input->op()->ValueOutputCount(), index);
305 // Type can be anything. 320 // Type can be anything.
306 // TODO(rossberg): Introduce tuple types for this. 321 // TODO(rossberg): Introduce tuple types for this.
307 // TODO(titzer): Convince rossberg not to. 322 // TODO(titzer): Convince rossberg not to.
308 CheckUpperIs(node, Type::Any()); 323 CheckUpperIs(node, Type::Any());
309 break; 324 break;
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after
988 // Check inputs for all nodes in the block. 1003 // Check inputs for all nodes in the block.
989 for (size_t i = 0; i < block->NodeCount(); i++) { 1004 for (size_t i = 0; i < block->NodeCount(); i++) {
990 Node* node = block->NodeAt(i); 1005 Node* node = block->NodeAt(i);
991 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1); 1006 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1);
992 } 1007 }
993 } 1008 }
994 } 1009 }
995 } 1010 }
996 } 1011 }
997 } // namespace v8::internal::compiler 1012 } // namespace v8::internal::compiler
OLDNEW
« no previous file with comments | « src/compiler/typer.cc ('k') | src/compiler/x64/code-generator-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698