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

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

Issue 2224943002: [turbo] Also weaken induction variables in the typer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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 | « no previous file | no next file » | 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/typer.h" 5 #include "src/compiler/typer.h"
6 6
7 #include <iomanip> 7 #include <iomanip>
8 8
9 #include "src/base/flags.h" 9 #include "src/base/flags.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 static Type* JSLoadPropertyTyper(Type*, Type*, Typer*); 297 static Type* JSLoadPropertyTyper(Type*, Type*, Typer*);
298 static Type* JSCallFunctionTyper(Type*, Typer*); 298 static Type* JSCallFunctionTyper(Type*, Typer*);
299 299
300 static Type* ReferenceEqualTyper(Type*, Type*, Typer*); 300 static Type* ReferenceEqualTyper(Type*, Type*, Typer*);
301 static Type* StringFromCharCodeTyper(Type*, Typer*); 301 static Type* StringFromCharCodeTyper(Type*, Typer*);
302 302
303 Reduction UpdateType(Node* node, Type* current) { 303 Reduction UpdateType(Node* node, Type* current) {
304 if (NodeProperties::IsTyped(node)) { 304 if (NodeProperties::IsTyped(node)) {
305 // Widen the type of a previously typed node. 305 // Widen the type of a previously typed node.
306 Type* previous = NodeProperties::GetType(node); 306 Type* previous = NodeProperties::GetType(node);
307 if (node->opcode() == IrOpcode::kPhi) { 307 if (node->opcode() == IrOpcode::kPhi ||
308 node->opcode() == IrOpcode::kInductionVariablePhi) {
308 // Speed up termination in the presence of range types: 309 // Speed up termination in the presence of range types:
309 current = Weaken(node, current, previous); 310 current = Weaken(node, current, previous);
310 } 311 }
311 312
312 CHECK(previous->Is(current)); 313 CHECK(previous->Is(current));
313 314
314 NodeProperties::SetType(node, current); 315 NodeProperties::SetType(node, current);
315 if (!current->Is(previous)) { 316 if (!current->Is(previous)) {
316 // If something changed, revisit all uses. 317 // If something changed, revisit all uses.
317 return Changed(node); 318 return Changed(node);
(...skipping 1990 matching lines...) Expand 10 before | Expand all | Expand 10 after
2308 } 2309 }
2309 if (Type::IsInteger(*value)) { 2310 if (Type::IsInteger(*value)) {
2310 return Type::Range(value->Number(), value->Number(), zone()); 2311 return Type::Range(value->Number(), value->Number(), zone());
2311 } 2312 }
2312 return Type::Constant(value, zone()); 2313 return Type::Constant(value, zone());
2313 } 2314 }
2314 2315
2315 } // namespace compiler 2316 } // namespace compiler
2316 } // namespace internal 2317 } // namespace internal
2317 } // namespace v8 2318 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698