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

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

Issue 1215333005: [turbofan] Perform OSR deconstruction early and remove type propagation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
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/typer.h" 5 #include "src/compiler/typer.h"
6 6
7 #include "src/base/flags.h" 7 #include "src/base/flags.h"
8 #include "src/base/lazy-instance.h" 8 #include "src/base/lazy-instance.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/compiler/graph-reducer.h" 10 #include "src/compiler/graph-reducer.h"
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 Type::FunctionType* function_type = typer_->function_type(); 575 Type::FunctionType* function_type = typer_->function_type();
576 if (function_type != nullptr && param >= 0 && 576 if (function_type != nullptr && param >= 0 &&
577 param < static_cast<int>(function_type->Arity())) { 577 param < static_cast<int>(function_type->Arity())) {
578 return Bounds(Type::None(), function_type->Parameter(param)); 578 return Bounds(Type::None(), function_type->Parameter(param));
579 } 579 }
580 return Bounds::Unbounded(zone()); 580 return Bounds::Unbounded(zone());
581 } 581 }
582 582
583 583
584 Bounds Typer::Visitor::TypeOsrValue(Node* node) { 584 Bounds Typer::Visitor::TypeOsrValue(Node* node) {
585 if (node->InputAt(0)->opcode() == IrOpcode::kOsrLoopEntry) {
586 // Before deconstruction, OSR values have type {None} to avoid polluting
587 // the types of phis and other nodes in the graph.
588 return Bounds(Type::None(), Type::None());
589 }
590 if (NodeProperties::IsTyped(node)) {
591 // After deconstruction, OSR values may have had a type explicitly set.
592 return NodeProperties::GetBounds(node);
593 }
594 // Otherwise, be conservative.
595 return Bounds::Unbounded(zone()); 585 return Bounds::Unbounded(zone());
596 } 586 }
597 587
598 588
599 Bounds Typer::Visitor::TypeInt32Constant(Node* node) { 589 Bounds Typer::Visitor::TypeInt32Constant(Node* node) {
600 double number = OpParameter<int32_t>(node); 590 double number = OpParameter<int32_t>(node);
601 return Bounds(Type::Intersect( 591 return Bounds(Type::Intersect(
602 Type::Range(number, number, zone()), Type::UntaggedSigned32(), zone())); 592 Type::Range(number, number, zone()), Type::UntaggedSigned32(), zone()));
603 } 593 }
604 594
(...skipping 1775 matching lines...) Expand 10 before | Expand all | Expand 10 after
2380 TYPED_ARRAYS(TYPED_ARRAY_CASE) 2370 TYPED_ARRAYS(TYPED_ARRAY_CASE)
2381 #undef TYPED_ARRAY_CASE 2371 #undef TYPED_ARRAY_CASE
2382 } 2372 }
2383 } 2373 }
2384 return Type::Constant(value, zone()); 2374 return Type::Constant(value, zone());
2385 } 2375 }
2386 2376
2387 } // namespace compiler 2377 } // namespace compiler
2388 } // namespace internal 2378 } // namespace internal
2389 } // namespace v8 2379 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698