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

Side by Side Diff: src/compiler/simplified-lowering.cc

Issue 2163173002: [turbofan] In the feedback refinement retyper, always intersect the upper bound with the type. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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
« 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/simplified-lowering.h" 5 #include "src/compiler/simplified-lowering.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "src/address-map.h" 9 #include "src/address-map.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 } 480 }
481 481
482 default: 482 default:
483 // Shortcut for operations that we do not handle. 483 // Shortcut for operations that we do not handle.
484 if (type == nullptr) { 484 if (type == nullptr) {
485 GetInfo(node)->set_feedback_type(NodeProperties::GetType(node)); 485 GetInfo(node)->set_feedback_type(NodeProperties::GetType(node));
486 return true; 486 return true;
487 } 487 }
488 return false; 488 return false;
489 } 489 }
490 // We need to guarantee that the feedback type is a subtype of the upper
491 // bound. Naively that should hold, but weakening can actually produce
492 // a bigger type if we are unlucky with ordering of phi typing. To be
493 // really sure, just intersect the upper bound with the feedback type.
494 new_type = Type::Intersect(GetUpperBound(node), new_type, graph_zone());
495
490 if (type != nullptr && new_type->Is(type)) return false; 496 if (type != nullptr && new_type->Is(type)) return false;
491 GetInfo(node)->set_feedback_type(new_type); 497 GetInfo(node)->set_feedback_type(new_type);
492 if (FLAG_trace_representation) { 498 if (FLAG_trace_representation) {
493 PrintNodeFeedbackType(node); 499 PrintNodeFeedbackType(node);
494 } 500 }
495 return true; 501 return true;
496 } 502 }
497 503
498 void PrintNodeFeedbackType(Node* n) { 504 void PrintNodeFeedbackType(Node* n) {
499 OFStream os(stdout); 505 OFStream os(stdout);
(...skipping 2873 matching lines...) Expand 10 before | Expand all | Expand 10 after
3373 isolate(), graph()->zone(), callable.descriptor(), 0, flags, 3379 isolate(), graph()->zone(), callable.descriptor(), 0, flags,
3374 Operator::kNoProperties); 3380 Operator::kNoProperties);
3375 to_number_operator_.set(common()->Call(desc)); 3381 to_number_operator_.set(common()->Call(desc));
3376 } 3382 }
3377 return to_number_operator_.get(); 3383 return to_number_operator_.get();
3378 } 3384 }
3379 3385
3380 } // namespace compiler 3386 } // namespace compiler
3381 } // namespace internal 3387 } // namespace internal
3382 } // namespace v8 3388 } // 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