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

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

Issue 2362173003: [turbofan] Improve representation selection for Smi checking. (Closed)
Patch Set: Address comments Created 4 years, 3 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/simplified-operator.h ('k') | src/compiler/simplified-operator-reducer.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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-operator.h" 5 #include "src/compiler/simplified-operator.h"
6 6
7 #include "src/base/lazy-instance.h" 7 #include "src/base/lazy-instance.h"
8 #include "src/compiler/opcodes.h" 8 #include "src/compiler/opcodes.h"
9 #include "src/compiler/operator.h" 9 #include "src/compiler/operator.h"
10 #include "src/compiler/types.h" 10 #include "src/compiler/types.h"
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 V(StringEqual, Operator::kCommutative, 2, 0) \ 418 V(StringEqual, Operator::kCommutative, 2, 0) \
419 V(StringLessThan, Operator::kNoProperties, 2, 0) \ 419 V(StringLessThan, Operator::kNoProperties, 2, 0) \
420 V(StringLessThanOrEqual, Operator::kNoProperties, 2, 0) 420 V(StringLessThanOrEqual, Operator::kNoProperties, 2, 0)
421 421
422 #define SPECULATIVE_NUMBER_BINOP_LIST(V) \ 422 #define SPECULATIVE_NUMBER_BINOP_LIST(V) \
423 SIMPLIFIED_SPECULATIVE_NUMBER_BINOP_LIST(V) \ 423 SIMPLIFIED_SPECULATIVE_NUMBER_BINOP_LIST(V) \
424 V(SpeculativeNumberEqual) \ 424 V(SpeculativeNumberEqual) \
425 V(SpeculativeNumberLessThan) \ 425 V(SpeculativeNumberLessThan) \
426 V(SpeculativeNumberLessThanOrEqual) 426 V(SpeculativeNumberLessThanOrEqual)
427 427
428 #define CHECKED_OP_LIST(V) \ 428 #define CHECKED_OP_LIST(V) \
429 V(CheckBounds, 2, 1) \ 429 V(CheckBounds, 2, 1) \
430 V(CheckIf, 1, 0) \ 430 V(CheckHeapObject, 1, 1) \
431 V(CheckNumber, 1, 1) \ 431 V(CheckIf, 1, 0) \
432 V(CheckString, 1, 1) \ 432 V(CheckNumber, 1, 1) \
433 V(CheckTaggedHole, 1, 1) \ 433 V(CheckSmi, 1, 1) \
434 V(CheckTaggedPointer, 1, 1) \ 434 V(CheckString, 1, 1) \
435 V(CheckTaggedSigned, 1, 1) \ 435 V(CheckTaggedHole, 1, 1) \
436 V(CheckedInt32Add, 2, 1) \ 436 V(CheckedInt32Add, 2, 1) \
437 V(CheckedInt32Sub, 2, 1) \ 437 V(CheckedInt32Sub, 2, 1) \
438 V(CheckedInt32Div, 2, 1) \ 438 V(CheckedInt32Div, 2, 1) \
439 V(CheckedInt32Mod, 2, 1) \ 439 V(CheckedInt32Mod, 2, 1) \
440 V(CheckedUint32Div, 2, 1) \ 440 V(CheckedUint32Div, 2, 1) \
441 V(CheckedUint32Mod, 2, 1) \ 441 V(CheckedUint32Mod, 2, 1) \
442 V(CheckedUint32ToInt32, 1, 1) \ 442 V(CheckedUint32ToInt32, 1, 1) \
443 V(CheckedTaggedSignedToInt32, 1, 1) \ 443 V(CheckedUint32ToTaggedSigned, 1, 1) \
444 V(CheckedInt32ToTaggedSigned, 1, 1) \
445 V(CheckedTaggedSignedToInt32, 1, 1) \
446 V(CheckedTaggedToTaggedSigned, 1, 1) \
444 V(CheckedTruncateTaggedToWord32, 1, 1) 447 V(CheckedTruncateTaggedToWord32, 1, 1)
445 448
446 struct SimplifiedOperatorGlobalCache final { 449 struct SimplifiedOperatorGlobalCache final {
447 #define PURE(Name, properties, value_input_count, control_input_count) \ 450 #define PURE(Name, properties, value_input_count, control_input_count) \
448 struct Name##Operator final : public Operator { \ 451 struct Name##Operator final : public Operator { \
449 Name##Operator() \ 452 Name##Operator() \
450 : Operator(IrOpcode::k##Name, Operator::kPure | properties, #Name, \ 453 : Operator(IrOpcode::k##Name, Operator::kPure | properties, #Name, \
451 value_input_count, 0, control_input_count, 1, 0, 0) {} \ 454 value_input_count, 0, control_input_count, 1, 0, 0) {} \
452 }; \ 455 }; \
453 Name##Operator k##Name; 456 Name##Operator k##Name;
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 Operator::kNoDeopt | Operator::kNoThrow | properties, \ 813 Operator::kNoDeopt | Operator::kNoThrow | properties, \
811 #Name, value_input_count, 1, control_input_count, \ 814 #Name, value_input_count, 1, control_input_count, \
812 output_count, 1, 0, access); \ 815 output_count, 1, 0, access); \
813 } 816 }
814 ACCESS_OP_LIST(ACCESS) 817 ACCESS_OP_LIST(ACCESS)
815 #undef ACCESS 818 #undef ACCESS
816 819
817 } // namespace compiler 820 } // namespace compiler
818 } // namespace internal 821 } // namespace internal
819 } // namespace v8 822 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/simplified-operator.h ('k') | src/compiler/simplified-operator-reducer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698