LCOV - code coverage report
Current view: top level - src/compiler - machine-operator.cc (source / functions) Hit Total Coverage
Test: app.info Lines: 148 222 66.7 %
Date: 2019-04-19 Functions: 818 1957 41.8 %

          Line data    Source code
       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
       3             : // found in the LICENSE file.
       4             : 
       5             : #include "src/compiler/machine-operator.h"
       6             : 
       7             : #include "src/base/lazy-instance.h"
       8             : #include "src/compiler/opcodes.h"
       9             : #include "src/compiler/operator.h"
      10             : 
      11             : namespace v8 {
      12             : namespace internal {
      13             : namespace compiler {
      14             : 
      15         171 : bool operator==(StoreRepresentation lhs, StoreRepresentation rhs) {
      16         171 :   return lhs.representation() == rhs.representation() &&
      17         171 :          lhs.write_barrier_kind() == rhs.write_barrier_kind();
      18             : }
      19             : 
      20             : 
      21           0 : bool operator!=(StoreRepresentation lhs, StoreRepresentation rhs) {
      22           0 :   return !(lhs == rhs);
      23             : }
      24             : 
      25             : 
      26           0 : size_t hash_value(StoreRepresentation rep) {
      27           0 :   return base::hash_combine(rep.representation(), rep.write_barrier_kind());
      28             : }
      29             : 
      30             : 
      31           0 : std::ostream& operator<<(std::ostream& os, StoreRepresentation rep) {
      32           0 :   return os << "(" << rep.representation() << " : " << rep.write_barrier_kind()
      33           0 :             << ")";
      34             : }
      35             : 
      36             : 
      37    19376845 : LoadRepresentation LoadRepresentationOf(Operator const* op) {
      38             :   DCHECK(IrOpcode::kLoad == op->opcode() ||
      39             :          IrOpcode::kProtectedLoad == op->opcode() ||
      40             :          IrOpcode::kWord32AtomicLoad == op->opcode() ||
      41             :          IrOpcode::kWord64AtomicLoad == op->opcode() ||
      42             :          IrOpcode::kWord32AtomicPairLoad == op->opcode() ||
      43             :          IrOpcode::kPoisonedLoad == op->opcode() ||
      44             :          IrOpcode::kUnalignedLoad == op->opcode());
      45    19376845 :   return OpParameter<LoadRepresentation>(op);
      46             : }
      47             : 
      48             : 
      49     8519146 : StoreRepresentation const& StoreRepresentationOf(Operator const* op) {
      50             :   DCHECK(IrOpcode::kStore == op->opcode() ||
      51             :          IrOpcode::kProtectedStore == op->opcode());
      52     8519146 :   return OpParameter<StoreRepresentation>(op);
      53             : }
      54             : 
      55           1 : UnalignedStoreRepresentation const& UnalignedStoreRepresentationOf(
      56             :     Operator const* op) {
      57             :   DCHECK_EQ(IrOpcode::kUnalignedStore, op->opcode());
      58           1 :   return OpParameter<UnalignedStoreRepresentation>(op);
      59             : }
      60             : 
      61           7 : bool operator==(StackSlotRepresentation lhs, StackSlotRepresentation rhs) {
      62           7 :   return lhs.size() == rhs.size() && lhs.alignment() == rhs.alignment();
      63             : }
      64             : 
      65           0 : bool operator!=(StackSlotRepresentation lhs, StackSlotRepresentation rhs) {
      66           0 :   return !(lhs == rhs);
      67             : }
      68             : 
      69           0 : size_t hash_value(StackSlotRepresentation rep) {
      70           0 :   return base::hash_combine(rep.size(), rep.alignment());
      71             : }
      72             : 
      73           0 : std::ostream& operator<<(std::ostream& os, StackSlotRepresentation rep) {
      74           0 :   return os << "(" << rep.size() << " : " << rep.alignment() << ")";
      75             : }
      76             : 
      77      367612 : StackSlotRepresentation const& StackSlotRepresentationOf(Operator const* op) {
      78             :   DCHECK_EQ(IrOpcode::kStackSlot, op->opcode());
      79      367612 :   return OpParameter<StackSlotRepresentation>(op);
      80             : }
      81             : 
      82        4168 : MachineRepresentation AtomicStoreRepresentationOf(Operator const* op) {
      83             :   DCHECK(IrOpcode::kWord32AtomicStore == op->opcode() ||
      84             :          IrOpcode::kWord64AtomicStore == op->opcode());
      85        4168 :   return OpParameter<MachineRepresentation>(op);
      86             : }
      87             : 
      88       61597 : MachineType AtomicOpType(Operator const* op) {
      89       61597 :   return OpParameter<MachineType>(op);
      90             : }
      91             : 
      92             : #define PURE_BINARY_OP_LIST_32(V)                                           \
      93             :   V(Word32And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1)    \
      94             :   V(Word32Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1)     \
      95             :   V(Word32Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1)    \
      96             :   V(Word32Shl, Operator::kNoProperties, 2, 0, 1)                            \
      97             :   V(Word32Shr, Operator::kNoProperties, 2, 0, 1)                            \
      98             :   V(Word32Sar, Operator::kNoProperties, 2, 0, 1)                            \
      99             :   V(Word32Ror, Operator::kNoProperties, 2, 0, 1)                            \
     100             :   V(Word32Equal, Operator::kCommutative, 2, 0, 1)                           \
     101             :   V(Int32Add, Operator::kAssociative | Operator::kCommutative, 2, 0, 1)     \
     102             :   V(Int32Sub, Operator::kNoProperties, 2, 0, 1)                             \
     103             :   V(Int32Mul, Operator::kAssociative | Operator::kCommutative, 2, 0, 1)     \
     104             :   V(Int32MulHigh, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
     105             :   V(Int32Div, Operator::kNoProperties, 2, 1, 1)                             \
     106             :   V(Int32Mod, Operator::kNoProperties, 2, 1, 1)                             \
     107             :   V(Int32LessThan, Operator::kNoProperties, 2, 0, 1)                        \
     108             :   V(Int32LessThanOrEqual, Operator::kNoProperties, 2, 0, 1)                 \
     109             :   V(Uint32Div, Operator::kNoProperties, 2, 1, 1)                            \
     110             :   V(Uint32LessThan, Operator::kNoProperties, 2, 0, 1)                       \
     111             :   V(Uint32LessThanOrEqual, Operator::kNoProperties, 2, 0, 1)                \
     112             :   V(Uint32Mod, Operator::kNoProperties, 2, 1, 1)                            \
     113             :   V(Uint32MulHigh, Operator::kAssociative | Operator::kCommutative, 2, 0, 1)
     114             : 
     115             : #define PURE_BINARY_OP_LIST_64(V)                                        \
     116             :   V(Word64And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
     117             :   V(Word64Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1)  \
     118             :   V(Word64Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
     119             :   V(Word64Shl, Operator::kNoProperties, 2, 0, 1)                         \
     120             :   V(Word64Shr, Operator::kNoProperties, 2, 0, 1)                         \
     121             :   V(Word64Sar, Operator::kNoProperties, 2, 0, 1)                         \
     122             :   V(Word64Ror, Operator::kNoProperties, 2, 0, 1)                         \
     123             :   V(Word64Equal, Operator::kCommutative, 2, 0, 1)                        \
     124             :   V(Int64Add, Operator::kAssociative | Operator::kCommutative, 2, 0, 1)  \
     125             :   V(Int64Sub, Operator::kNoProperties, 2, 0, 1)                          \
     126             :   V(Int64Mul, Operator::kAssociative | Operator::kCommutative, 2, 0, 1)  \
     127             :   V(Int64Div, Operator::kNoProperties, 2, 1, 1)                          \
     128             :   V(Int64Mod, Operator::kNoProperties, 2, 1, 1)                          \
     129             :   V(Int64LessThan, Operator::kNoProperties, 2, 0, 1)                     \
     130             :   V(Int64LessThanOrEqual, Operator::kNoProperties, 2, 0, 1)              \
     131             :   V(Uint64Div, Operator::kNoProperties, 2, 1, 1)                         \
     132             :   V(Uint64Mod, Operator::kNoProperties, 2, 1, 1)                         \
     133             :   V(Uint64LessThan, Operator::kNoProperties, 2, 0, 1)                    \
     134             :   V(Uint64LessThanOrEqual, Operator::kNoProperties, 2, 0, 1)
     135             : 
     136             : #define MACHINE_PURE_OP_LIST(V)                                               \
     137             :   PURE_BINARY_OP_LIST_32(V)                                                   \
     138             :   PURE_BINARY_OP_LIST_64(V)                                                   \
     139             :   V(Word32Clz, Operator::kNoProperties, 1, 0, 1)                              \
     140             :   V(Word64Clz, Operator::kNoProperties, 1, 0, 1)                              \
     141             :   V(Word32ReverseBytes, Operator::kNoProperties, 1, 0, 1)                     \
     142             :   V(Word64ReverseBytes, Operator::kNoProperties, 1, 0, 1)                     \
     143             :   V(BitcastWordToTaggedSigned, Operator::kNoProperties, 1, 0, 1)              \
     144             :   V(TruncateFloat64ToWord32, Operator::kNoProperties, 1, 0, 1)                \
     145             :   V(ChangeFloat32ToFloat64, Operator::kNoProperties, 1, 0, 1)                 \
     146             :   V(ChangeFloat64ToInt32, Operator::kNoProperties, 1, 0, 1)                   \
     147             :   V(ChangeFloat64ToInt64, Operator::kNoProperties, 1, 0, 1)                   \
     148             :   V(ChangeFloat64ToUint32, Operator::kNoProperties, 1, 0, 1)                  \
     149             :   V(ChangeFloat64ToUint64, Operator::kNoProperties, 1, 0, 1)                  \
     150             :   V(TruncateFloat64ToInt64, Operator::kNoProperties, 1, 0, 1)                 \
     151             :   V(TruncateFloat64ToUint32, Operator::kNoProperties, 1, 0, 1)                \
     152             :   V(TruncateFloat32ToInt32, Operator::kNoProperties, 1, 0, 1)                 \
     153             :   V(TruncateFloat32ToUint32, Operator::kNoProperties, 1, 0, 1)                \
     154             :   V(TryTruncateFloat32ToInt64, Operator::kNoProperties, 1, 0, 2)              \
     155             :   V(TryTruncateFloat64ToInt64, Operator::kNoProperties, 1, 0, 2)              \
     156             :   V(TryTruncateFloat32ToUint64, Operator::kNoProperties, 1, 0, 2)             \
     157             :   V(TryTruncateFloat64ToUint64, Operator::kNoProperties, 1, 0, 2)             \
     158             :   V(ChangeInt32ToFloat64, Operator::kNoProperties, 1, 0, 1)                   \
     159             :   V(ChangeInt64ToFloat64, Operator::kNoProperties, 1, 0, 1)                   \
     160             :   V(Float64SilenceNaN, Operator::kNoProperties, 1, 0, 1)                      \
     161             :   V(RoundFloat64ToInt32, Operator::kNoProperties, 1, 0, 1)                    \
     162             :   V(RoundInt32ToFloat32, Operator::kNoProperties, 1, 0, 1)                    \
     163             :   V(RoundInt64ToFloat32, Operator::kNoProperties, 1, 0, 1)                    \
     164             :   V(RoundInt64ToFloat64, Operator::kNoProperties, 1, 0, 1)                    \
     165             :   V(RoundUint32ToFloat32, Operator::kNoProperties, 1, 0, 1)                   \
     166             :   V(RoundUint64ToFloat32, Operator::kNoProperties, 1, 0, 1)                   \
     167             :   V(RoundUint64ToFloat64, Operator::kNoProperties, 1, 0, 1)                   \
     168             :   V(ChangeInt32ToInt64, Operator::kNoProperties, 1, 0, 1)                     \
     169             :   V(ChangeUint32ToFloat64, Operator::kNoProperties, 1, 0, 1)                  \
     170             :   V(ChangeUint32ToUint64, Operator::kNoProperties, 1, 0, 1)                   \
     171             :   V(ChangeTaggedToCompressed, Operator::kNoProperties, 1, 0, 1)               \
     172             :   V(ChangeTaggedPointerToCompressedPointer, Operator::kNoProperties, 1, 0, 1) \
     173             :   V(ChangeTaggedSignedToCompressedSigned, Operator::kNoProperties, 1, 0, 1)   \
     174             :   V(ChangeCompressedToTagged, Operator::kNoProperties, 1, 0, 1)               \
     175             :   V(ChangeCompressedPointerToTaggedPointer, Operator::kNoProperties, 1, 0, 1) \
     176             :   V(ChangeCompressedSignedToTaggedSigned, Operator::kNoProperties, 1, 0, 1)   \
     177             :   V(TruncateFloat64ToFloat32, Operator::kNoProperties, 1, 0, 1)               \
     178             :   V(TruncateInt64ToInt32, Operator::kNoProperties, 1, 0, 1)                   \
     179             :   V(BitcastFloat32ToInt32, Operator::kNoProperties, 1, 0, 1)                  \
     180             :   V(BitcastFloat64ToInt64, Operator::kNoProperties, 1, 0, 1)                  \
     181             :   V(BitcastInt32ToFloat32, Operator::kNoProperties, 1, 0, 1)                  \
     182             :   V(BitcastInt64ToFloat64, Operator::kNoProperties, 1, 0, 1)                  \
     183             :   V(SignExtendWord8ToInt32, Operator::kNoProperties, 1, 0, 1)                 \
     184             :   V(SignExtendWord16ToInt32, Operator::kNoProperties, 1, 0, 1)                \
     185             :   V(SignExtendWord8ToInt64, Operator::kNoProperties, 1, 0, 1)                 \
     186             :   V(SignExtendWord16ToInt64, Operator::kNoProperties, 1, 0, 1)                \
     187             :   V(SignExtendWord32ToInt64, Operator::kNoProperties, 1, 0, 1)                \
     188             :   V(Float32Abs, Operator::kNoProperties, 1, 0, 1)                             \
     189             :   V(Float32Add, Operator::kCommutative, 2, 0, 1)                              \
     190             :   V(Float32Sub, Operator::kNoProperties, 2, 0, 1)                             \
     191             :   V(Float32Mul, Operator::kCommutative, 2, 0, 1)                              \
     192             :   V(Float32Div, Operator::kNoProperties, 2, 0, 1)                             \
     193             :   V(Float32Neg, Operator::kNoProperties, 1, 0, 1)                             \
     194             :   V(Float32Sqrt, Operator::kNoProperties, 1, 0, 1)                            \
     195             :   V(Float32Max, Operator::kAssociative | Operator::kCommutative, 2, 0, 1)     \
     196             :   V(Float32Min, Operator::kAssociative | Operator::kCommutative, 2, 0, 1)     \
     197             :   V(Float64Abs, Operator::kNoProperties, 1, 0, 1)                             \
     198             :   V(Float64Acos, Operator::kNoProperties, 1, 0, 1)                            \
     199             :   V(Float64Acosh, Operator::kNoProperties, 1, 0, 1)                           \
     200             :   V(Float64Asin, Operator::kNoProperties, 1, 0, 1)                            \
     201             :   V(Float64Asinh, Operator::kNoProperties, 1, 0, 1)                           \
     202             :   V(Float64Atan, Operator::kNoProperties, 1, 0, 1)                            \
     203             :   V(Float64Atan2, Operator::kNoProperties, 2, 0, 1)                           \
     204             :   V(Float64Atanh, Operator::kNoProperties, 1, 0, 1)                           \
     205             :   V(Float64Cbrt, Operator::kNoProperties, 1, 0, 1)                            \
     206             :   V(Float64Cos, Operator::kNoProperties, 1, 0, 1)                             \
     207             :   V(Float64Cosh, Operator::kNoProperties, 1, 0, 1)                            \
     208             :   V(Float64Exp, Operator::kNoProperties, 1, 0, 1)                             \
     209             :   V(Float64Expm1, Operator::kNoProperties, 1, 0, 1)                           \
     210             :   V(Float64Log, Operator::kNoProperties, 1, 0, 1)                             \
     211             :   V(Float64Log1p, Operator::kNoProperties, 1, 0, 1)                           \
     212             :   V(Float64Log2, Operator::kNoProperties, 1, 0, 1)                            \
     213             :   V(Float64Log10, Operator::kNoProperties, 1, 0, 1)                           \
     214             :   V(Float64Max, Operator::kAssociative | Operator::kCommutative, 2, 0, 1)     \
     215             :   V(Float64Min, Operator::kAssociative | Operator::kCommutative, 2, 0, 1)     \
     216             :   V(Float64Neg, Operator::kNoProperties, 1, 0, 1)                             \
     217             :   V(Float64Add, Operator::kCommutative, 2, 0, 1)                              \
     218             :   V(Float64Sub, Operator::kNoProperties, 2, 0, 1)                             \
     219             :   V(Float64Mul, Operator::kCommutative, 2, 0, 1)                              \
     220             :   V(Float64Div, Operator::kNoProperties, 2, 0, 1)                             \
     221             :   V(Float64Mod, Operator::kNoProperties, 2, 0, 1)                             \
     222             :   V(Float64Pow, Operator::kNoProperties, 2, 0, 1)                             \
     223             :   V(Float64Sin, Operator::kNoProperties, 1, 0, 1)                             \
     224             :   V(Float64Sinh, Operator::kNoProperties, 1, 0, 1)                            \
     225             :   V(Float64Sqrt, Operator::kNoProperties, 1, 0, 1)                            \
     226             :   V(Float64Tan, Operator::kNoProperties, 1, 0, 1)                             \
     227             :   V(Float64Tanh, Operator::kNoProperties, 1, 0, 1)                            \
     228             :   V(Float32Equal, Operator::kCommutative, 2, 0, 1)                            \
     229             :   V(Float32LessThan, Operator::kNoProperties, 2, 0, 1)                        \
     230             :   V(Float32LessThanOrEqual, Operator::kNoProperties, 2, 0, 1)                 \
     231             :   V(Float64Equal, Operator::kCommutative, 2, 0, 1)                            \
     232             :   V(Float64LessThan, Operator::kNoProperties, 2, 0, 1)                        \
     233             :   V(Float64LessThanOrEqual, Operator::kNoProperties, 2, 0, 1)                 \
     234             :   V(Float64ExtractLowWord32, Operator::kNoProperties, 1, 0, 1)                \
     235             :   V(Float64ExtractHighWord32, Operator::kNoProperties, 1, 0, 1)               \
     236             :   V(Float64InsertLowWord32, Operator::kNoProperties, 2, 0, 1)                 \
     237             :   V(Float64InsertHighWord32, Operator::kNoProperties, 2, 0, 1)                \
     238             :   V(LoadStackPointer, Operator::kNoProperties, 0, 0, 1)                       \
     239             :   V(LoadFramePointer, Operator::kNoProperties, 0, 0, 1)                       \
     240             :   V(LoadParentFramePointer, Operator::kNoProperties, 0, 0, 1)                 \
     241             :   V(Int32PairAdd, Operator::kNoProperties, 4, 0, 2)                           \
     242             :   V(Int32PairSub, Operator::kNoProperties, 4, 0, 2)                           \
     243             :   V(Int32PairMul, Operator::kNoProperties, 4, 0, 2)                           \
     244             :   V(Word32PairShl, Operator::kNoProperties, 3, 0, 2)                          \
     245             :   V(Word32PairShr, Operator::kNoProperties, 3, 0, 2)                          \
     246             :   V(Word32PairSar, Operator::kNoProperties, 3, 0, 2)                          \
     247             :   V(F32x4Splat, Operator::kNoProperties, 1, 0, 1)                             \
     248             :   V(F32x4SConvertI32x4, Operator::kNoProperties, 1, 0, 1)                     \
     249             :   V(F32x4UConvertI32x4, Operator::kNoProperties, 1, 0, 1)                     \
     250             :   V(F32x4Abs, Operator::kNoProperties, 1, 0, 1)                               \
     251             :   V(F32x4Neg, Operator::kNoProperties, 1, 0, 1)                               \
     252             :   V(F32x4RecipApprox, Operator::kNoProperties, 1, 0, 1)                       \
     253             :   V(F32x4RecipSqrtApprox, Operator::kNoProperties, 1, 0, 1)                   \
     254             :   V(F32x4Add, Operator::kCommutative, 2, 0, 1)                                \
     255             :   V(F32x4AddHoriz, Operator::kNoProperties, 2, 0, 1)                          \
     256             :   V(F32x4Sub, Operator::kNoProperties, 2, 0, 1)                               \
     257             :   V(F32x4Mul, Operator::kCommutative, 2, 0, 1)                                \
     258             :   V(F32x4Min, Operator::kCommutative, 2, 0, 1)                                \
     259             :   V(F32x4Max, Operator::kCommutative, 2, 0, 1)                                \
     260             :   V(F32x4Eq, Operator::kCommutative, 2, 0, 1)                                 \
     261             :   V(F32x4Ne, Operator::kCommutative, 2, 0, 1)                                 \
     262             :   V(F32x4Lt, Operator::kNoProperties, 2, 0, 1)                                \
     263             :   V(F32x4Le, Operator::kNoProperties, 2, 0, 1)                                \
     264             :   V(I32x4Splat, Operator::kNoProperties, 1, 0, 1)                             \
     265             :   V(I32x4SConvertF32x4, Operator::kNoProperties, 1, 0, 1)                     \
     266             :   V(I32x4SConvertI16x8Low, Operator::kNoProperties, 1, 0, 1)                  \
     267             :   V(I32x4SConvertI16x8High, Operator::kNoProperties, 1, 0, 1)                 \
     268             :   V(I32x4Neg, Operator::kNoProperties, 1, 0, 1)                               \
     269             :   V(I32x4Add, Operator::kCommutative, 2, 0, 1)                                \
     270             :   V(I32x4AddHoriz, Operator::kNoProperties, 2, 0, 1)                          \
     271             :   V(I32x4Sub, Operator::kNoProperties, 2, 0, 1)                               \
     272             :   V(I32x4Mul, Operator::kCommutative, 2, 0, 1)                                \
     273             :   V(I32x4MinS, Operator::kCommutative, 2, 0, 1)                               \
     274             :   V(I32x4MaxS, Operator::kCommutative, 2, 0, 1)                               \
     275             :   V(I32x4Eq, Operator::kCommutative, 2, 0, 1)                                 \
     276             :   V(I32x4Ne, Operator::kCommutative, 2, 0, 1)                                 \
     277             :   V(I32x4GtS, Operator::kNoProperties, 2, 0, 1)                               \
     278             :   V(I32x4GeS, Operator::kNoProperties, 2, 0, 1)                               \
     279             :   V(I32x4UConvertF32x4, Operator::kNoProperties, 1, 0, 1)                     \
     280             :   V(I32x4UConvertI16x8Low, Operator::kNoProperties, 1, 0, 1)                  \
     281             :   V(I32x4UConvertI16x8High, Operator::kNoProperties, 1, 0, 1)                 \
     282             :   V(I32x4MinU, Operator::kCommutative, 2, 0, 1)                               \
     283             :   V(I32x4MaxU, Operator::kCommutative, 2, 0, 1)                               \
     284             :   V(I32x4GtU, Operator::kNoProperties, 2, 0, 1)                               \
     285             :   V(I32x4GeU, Operator::kNoProperties, 2, 0, 1)                               \
     286             :   V(I16x8Splat, Operator::kNoProperties, 1, 0, 1)                             \
     287             :   V(I16x8SConvertI8x16Low, Operator::kNoProperties, 1, 0, 1)                  \
     288             :   V(I16x8SConvertI8x16High, Operator::kNoProperties, 1, 0, 1)                 \
     289             :   V(I16x8Neg, Operator::kNoProperties, 1, 0, 1)                               \
     290             :   V(I16x8SConvertI32x4, Operator::kNoProperties, 2, 0, 1)                     \
     291             :   V(I16x8Add, Operator::kCommutative, 2, 0, 1)                                \
     292             :   V(I16x8AddSaturateS, Operator::kCommutative, 2, 0, 1)                       \
     293             :   V(I16x8AddHoriz, Operator::kNoProperties, 2, 0, 1)                          \
     294             :   V(I16x8Sub, Operator::kNoProperties, 2, 0, 1)                               \
     295             :   V(I16x8SubSaturateS, Operator::kNoProperties, 2, 0, 1)                      \
     296             :   V(I16x8Mul, Operator::kCommutative, 2, 0, 1)                                \
     297             :   V(I16x8MinS, Operator::kCommutative, 2, 0, 1)                               \
     298             :   V(I16x8MaxS, Operator::kCommutative, 2, 0, 1)                               \
     299             :   V(I16x8Eq, Operator::kCommutative, 2, 0, 1)                                 \
     300             :   V(I16x8Ne, Operator::kCommutative, 2, 0, 1)                                 \
     301             :   V(I16x8GtS, Operator::kNoProperties, 2, 0, 1)                               \
     302             :   V(I16x8GeS, Operator::kNoProperties, 2, 0, 1)                               \
     303             :   V(I16x8UConvertI8x16Low, Operator::kNoProperties, 1, 0, 1)                  \
     304             :   V(I16x8UConvertI8x16High, Operator::kNoProperties, 1, 0, 1)                 \
     305             :   V(I16x8UConvertI32x4, Operator::kNoProperties, 2, 0, 1)                     \
     306             :   V(I16x8AddSaturateU, Operator::kCommutative, 2, 0, 1)                       \
     307             :   V(I16x8SubSaturateU, Operator::kNoProperties, 2, 0, 1)                      \
     308             :   V(I16x8MinU, Operator::kCommutative, 2, 0, 1)                               \
     309             :   V(I16x8MaxU, Operator::kCommutative, 2, 0, 1)                               \
     310             :   V(I16x8GtU, Operator::kNoProperties, 2, 0, 1)                               \
     311             :   V(I16x8GeU, Operator::kNoProperties, 2, 0, 1)                               \
     312             :   V(I8x16Splat, Operator::kNoProperties, 1, 0, 1)                             \
     313             :   V(I8x16Neg, Operator::kNoProperties, 1, 0, 1)                               \
     314             :   V(I8x16SConvertI16x8, Operator::kNoProperties, 2, 0, 1)                     \
     315             :   V(I8x16Add, Operator::kCommutative, 2, 0, 1)                                \
     316             :   V(I8x16AddSaturateS, Operator::kCommutative, 2, 0, 1)                       \
     317             :   V(I8x16Sub, Operator::kNoProperties, 2, 0, 1)                               \
     318             :   V(I8x16SubSaturateS, Operator::kNoProperties, 2, 0, 1)                      \
     319             :   V(I8x16Mul, Operator::kCommutative, 2, 0, 1)                                \
     320             :   V(I8x16MinS, Operator::kCommutative, 2, 0, 1)                               \
     321             :   V(I8x16MaxS, Operator::kCommutative, 2, 0, 1)                               \
     322             :   V(I8x16Eq, Operator::kCommutative, 2, 0, 1)                                 \
     323             :   V(I8x16Ne, Operator::kCommutative, 2, 0, 1)                                 \
     324             :   V(I8x16GtS, Operator::kNoProperties, 2, 0, 1)                               \
     325             :   V(I8x16GeS, Operator::kNoProperties, 2, 0, 1)                               \
     326             :   V(I8x16UConvertI16x8, Operator::kNoProperties, 2, 0, 1)                     \
     327             :   V(I8x16AddSaturateU, Operator::kCommutative, 2, 0, 1)                       \
     328             :   V(I8x16SubSaturateU, Operator::kNoProperties, 2, 0, 1)                      \
     329             :   V(I8x16MinU, Operator::kCommutative, 2, 0, 1)                               \
     330             :   V(I8x16MaxU, Operator::kCommutative, 2, 0, 1)                               \
     331             :   V(I8x16GtU, Operator::kNoProperties, 2, 0, 1)                               \
     332             :   V(I8x16GeU, Operator::kNoProperties, 2, 0, 1)                               \
     333             :   V(S128Load, Operator::kNoProperties, 2, 0, 1)                               \
     334             :   V(S128Store, Operator::kNoProperties, 3, 0, 1)                              \
     335             :   V(S128Zero, Operator::kNoProperties, 0, 0, 1)                               \
     336             :   V(S128And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1)        \
     337             :   V(S128Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1)         \
     338             :   V(S128Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1)        \
     339             :   V(S128Not, Operator::kNoProperties, 1, 0, 1)                                \
     340             :   V(S128Select, Operator::kNoProperties, 3, 0, 1)                             \
     341             :   V(S1x4AnyTrue, Operator::kNoProperties, 1, 0, 1)                            \
     342             :   V(S1x4AllTrue, Operator::kNoProperties, 1, 0, 1)                            \
     343             :   V(S1x8AnyTrue, Operator::kNoProperties, 1, 0, 1)                            \
     344             :   V(S1x8AllTrue, Operator::kNoProperties, 1, 0, 1)                            \
     345             :   V(S1x16AnyTrue, Operator::kNoProperties, 1, 0, 1)                           \
     346             :   V(S1x16AllTrue, Operator::kNoProperties, 1, 0, 1)
     347             : 
     348             : #define PURE_OPTIONAL_OP_LIST(V)                            \
     349             :   V(Word32Ctz, Operator::kNoProperties, 1, 0, 1)            \
     350             :   V(Word64Ctz, Operator::kNoProperties, 1, 0, 1)            \
     351             :   V(Word32ReverseBits, Operator::kNoProperties, 1, 0, 1)    \
     352             :   V(Word64ReverseBits, Operator::kNoProperties, 1, 0, 1)    \
     353             :   V(Int32AbsWithOverflow, Operator::kNoProperties, 1, 0, 2) \
     354             :   V(Int64AbsWithOverflow, Operator::kNoProperties, 1, 0, 2) \
     355             :   V(Word32Popcnt, Operator::kNoProperties, 1, 0, 1)         \
     356             :   V(Word64Popcnt, Operator::kNoProperties, 1, 0, 1)         \
     357             :   V(Float32RoundDown, Operator::kNoProperties, 1, 0, 1)     \
     358             :   V(Float64RoundDown, Operator::kNoProperties, 1, 0, 1)     \
     359             :   V(Float32RoundUp, Operator::kNoProperties, 1, 0, 1)       \
     360             :   V(Float64RoundUp, Operator::kNoProperties, 1, 0, 1)       \
     361             :   V(Float32RoundTruncate, Operator::kNoProperties, 1, 0, 1) \
     362             :   V(Float64RoundTruncate, Operator::kNoProperties, 1, 0, 1) \
     363             :   V(Float64RoundTiesAway, Operator::kNoProperties, 1, 0, 1) \
     364             :   V(Float32RoundTiesEven, Operator::kNoProperties, 1, 0, 1) \
     365             :   V(Float64RoundTiesEven, Operator::kNoProperties, 1, 0, 1)
     366             : 
     367             : #define OVERFLOW_OP_LIST(V)                                                \
     368             :   V(Int32AddWithOverflow, Operator::kAssociative | Operator::kCommutative) \
     369             :   V(Int32SubWithOverflow, Operator::kNoProperties)                         \
     370             :   V(Int32MulWithOverflow, Operator::kAssociative | Operator::kCommutative) \
     371             :   V(Int64AddWithOverflow, Operator::kAssociative | Operator::kCommutative) \
     372             :   V(Int64SubWithOverflow, Operator::kNoProperties)
     373             : 
     374             : #define MACHINE_TYPE_LIST(V) \
     375             :   V(Float32)                 \
     376             :   V(Float64)                 \
     377             :   V(Simd128)                 \
     378             :   V(Int8)                    \
     379             :   V(Uint8)                   \
     380             :   V(Int16)                   \
     381             :   V(Uint16)                  \
     382             :   V(Int32)                   \
     383             :   V(Uint32)                  \
     384             :   V(Int64)                   \
     385             :   V(Uint64)                  \
     386             :   V(Pointer)                 \
     387             :   V(TaggedSigned)            \
     388             :   V(TaggedPointer)           \
     389             :   V(AnyTagged)               \
     390             :   V(CompressedSigned)        \
     391             :   V(CompressedPointer)       \
     392             :   V(AnyCompressed)
     393             : 
     394             : #define MACHINE_REPRESENTATION_LIST(V) \
     395             :   V(kFloat32)                          \
     396             :   V(kFloat64)                          \
     397             :   V(kSimd128)                          \
     398             :   V(kWord8)                            \
     399             :   V(kWord16)                           \
     400             :   V(kWord32)                           \
     401             :   V(kWord64)                           \
     402             :   V(kTaggedSigned)                     \
     403             :   V(kTaggedPointer)                    \
     404             :   V(kTagged)                           \
     405             :   V(kCompressedSigned)                 \
     406             :   V(kCompressedPointer)                \
     407             :   V(kCompressed)
     408             : 
     409             : #define ATOMIC_U32_TYPE_LIST(V) \
     410             :   V(Uint8)                      \
     411             :   V(Uint16)                     \
     412             :   V(Uint32)
     413             : 
     414             : #define ATOMIC_TYPE_LIST(V) \
     415             :   ATOMIC_U32_TYPE_LIST(V)   \
     416             :   V(Int8)                   \
     417             :   V(Int16)                  \
     418             :   V(Int32)
     419             : 
     420             : #define ATOMIC_U64_TYPE_LIST(V) \
     421             :   ATOMIC_U32_TYPE_LIST(V)       \
     422             :   V(Uint64)
     423             : 
     424             : #define ATOMIC_REPRESENTATION_LIST(V) \
     425             :   V(kWord8)                           \
     426             :   V(kWord16)                          \
     427             :   V(kWord32)
     428             : 
     429             : #define ATOMIC64_REPRESENTATION_LIST(V) \
     430             :   ATOMIC_REPRESENTATION_LIST(V)         \
     431             :   V(kWord64)
     432             : 
     433             : #define ATOMIC_PAIR_BINOP_LIST(V) \
     434             :   V(Add)                          \
     435             :   V(Sub)                          \
     436             :   V(And)                          \
     437             :   V(Or)                           \
     438             :   V(Xor)                          \
     439             :   V(Exchange)
     440             : 
     441             : #define SIMD_LANE_OP_LIST(V) \
     442             :   V(F32x4, 4)                \
     443             :   V(I32x4, 4)                \
     444             :   V(I16x8, 8)                \
     445             :   V(I8x16, 16)
     446             : 
     447             : #define SIMD_FORMAT_LIST(V) \
     448             :   V(32x4, 32)               \
     449             :   V(16x8, 16)               \
     450             :   V(8x16, 8)
     451             : 
     452             : #define STACK_SLOT_CACHED_SIZES_ALIGNMENTS_LIST(V) \
     453             :   V(4, 0) V(8, 0) V(16, 0) V(4, 4) V(8, 8) V(16, 16)
     454             : 
     455           0 : struct StackSlotOperator : public Operator1<StackSlotRepresentation> {
     456      541026 :   explicit StackSlotOperator(int size, int alignment)
     457             :       : Operator1<StackSlotRepresentation>(
     458             :             IrOpcode::kStackSlot, Operator::kNoDeopt | Operator::kNoThrow,
     459             :             "StackSlot", 0, 0, 0, 1, 0, 0,
     460      541026 :             StackSlotRepresentation(size, alignment)) {}
     461             : };
     462             : 
     463      410942 : struct MachineOperatorGlobalCache {
     464             : #define PURE(Name, properties, value_input_count, control_input_count,         \
     465             :              output_count)                                                     \
     466             :   struct Name##Operator final : public Operator {                              \
     467             :     Name##Operator()                                                           \
     468             :         : Operator(IrOpcode::k##Name, Operator::kPure | properties, #Name,     \
     469             :                    value_input_count, 0, control_input_count, output_count, 0, \
     470             :                    0) {}                                                       \
     471             :   };                                                                           \
     472             :   Name##Operator k##Name;
     473     7279544 :   MACHINE_PURE_OP_LIST(PURE)
     474      499001 :   PURE_OPTIONAL_OP_LIST(PURE)
     475             : #undef PURE
     476             : 
     477             : #define OVERFLOW_OP(Name, properties)                                        \
     478             :   struct Name##Operator final : public Operator {                            \
     479             :     Name##Operator()                                                         \
     480             :         : Operator(IrOpcode::k##Name,                                        \
     481             :                    Operator::kEliminatable | Operator::kNoRead | properties, \
     482             :                    #Name, 2, 0, 1, 2, 0, 0) {}                               \
     483             :   };                                                                         \
     484             :   Name##Operator k##Name;
     485      146765 :   OVERFLOW_OP_LIST(OVERFLOW_OP)
     486             : #undef OVERFLOW_OP
     487             : 
     488             : #define LOAD(Type)                                                            \
     489             :   struct Load##Type##Operator final : public Operator1<LoadRepresentation> {  \
     490             :     Load##Type##Operator()                                                    \
     491             :         : Operator1<LoadRepresentation>(                                      \
     492             :               IrOpcode::kLoad,                                                \
     493             :               Operator::kNoDeopt | Operator::kNoThrow | Operator::kNoWrite,   \
     494             :               "Load", 2, 1, 1, 1, 1, 0, MachineType::Type()) {}               \
     495             :   };                                                                          \
     496             :   struct PoisonedLoad##Type##Operator final                                   \
     497             :       : public Operator1<LoadRepresentation> {                                \
     498             :     PoisonedLoad##Type##Operator()                                            \
     499             :         : Operator1<LoadRepresentation>(                                      \
     500             :               IrOpcode::kPoisonedLoad,                                        \
     501             :               Operator::kNoDeopt | Operator::kNoThrow | Operator::kNoWrite,   \
     502             :               "PoisonedLoad", 2, 1, 1, 1, 1, 0, MachineType::Type()) {}       \
     503             :   };                                                                          \
     504             :   struct UnalignedLoad##Type##Operator final                                  \
     505             :       : public Operator1<LoadRepresentation> {                                \
     506             :     UnalignedLoad##Type##Operator()                                           \
     507             :         : Operator1<LoadRepresentation>(                                      \
     508             :               IrOpcode::kUnalignedLoad,                                       \
     509             :               Operator::kNoDeopt | Operator::kNoThrow | Operator::kNoWrite,   \
     510             :               "UnalignedLoad", 2, 1, 1, 1, 1, 0, MachineType::Type()) {}      \
     511             :   };                                                                          \
     512             :   struct ProtectedLoad##Type##Operator final                                  \
     513             :       : public Operator1<LoadRepresentation> {                                \
     514             :     ProtectedLoad##Type##Operator()                                           \
     515             :         : Operator1<LoadRepresentation>(                                      \
     516             :               IrOpcode::kProtectedLoad,                                       \
     517             :               Operator::kNoDeopt | Operator::kNoThrow, "ProtectedLoad", 2, 1, \
     518             :               1, 1, 1, 0, MachineType::Type()) {}                             \
     519             :   };                                                                          \
     520             :   Load##Type##Operator kLoad##Type;                                           \
     521             :   PoisonedLoad##Type##Operator kPoisonedLoad##Type;                           \
     522             :   UnalignedLoad##Type##Operator kUnalignedLoad##Type;                         \
     523             :   ProtectedLoad##Type##Operator kProtectedLoad##Type;
     524     4226832 :   MACHINE_TYPE_LIST(LOAD)
     525             : #undef LOAD
     526             : 
     527             : #define STACKSLOT(Size, Alignment)                                     \
     528             :   struct StackSlotOfSize##Size##OfAlignment##Alignment##Operator final \
     529             :       : public StackSlotOperator {                                     \
     530             :     StackSlotOfSize##Size##OfAlignment##Alignment##Operator()          \
     531             :         : StackSlotOperator(Size, Alignment) {}                        \
     532             :   };                                                                   \
     533             :   StackSlotOfSize##Size##OfAlignment##Alignment##Operator              \
     534             :       kStackSlotOfSize##Size##OfAlignment##Alignment;
     535       29353 :   STACK_SLOT_CACHED_SIZES_ALIGNMENTS_LIST(STACKSLOT)
     536             : #undef STACKSLOT
     537             : 
     538             : #define STORE(Type)                                                        \
     539             :   struct Store##Type##Operator : public Operator1<StoreRepresentation> {   \
     540             :     explicit Store##Type##Operator(WriteBarrierKind write_barrier_kind)    \
     541             :         : Operator1<StoreRepresentation>(                                  \
     542             :               IrOpcode::kStore,                                            \
     543             :               Operator::kNoDeopt | Operator::kNoRead | Operator::kNoThrow, \
     544             :               "Store", 3, 1, 1, 0, 1, 0,                                   \
     545             :               StoreRepresentation(MachineRepresentation::Type,             \
     546             :                                   write_barrier_kind)) {}                  \
     547             :   };                                                                       \
     548             :   struct Store##Type##NoWriteBarrier##Operator final                       \
     549             :       : public Store##Type##Operator {                                     \
     550             :     Store##Type##NoWriteBarrier##Operator()                                \
     551             :         : Store##Type##Operator(kNoWriteBarrier) {}                        \
     552             :   };                                                                       \
     553             :   struct Store##Type##MapWriteBarrier##Operator final                      \
     554             :       : public Store##Type##Operator {                                     \
     555             :     Store##Type##MapWriteBarrier##Operator()                               \
     556             :         : Store##Type##Operator(kMapWriteBarrier) {}                       \
     557             :   };                                                                       \
     558             :   struct Store##Type##PointerWriteBarrier##Operator final                  \
     559             :       : public Store##Type##Operator {                                     \
     560             :     Store##Type##PointerWriteBarrier##Operator()                           \
     561             :         : Store##Type##Operator(kPointerWriteBarrier) {}                   \
     562             :   };                                                                       \
     563             :   struct Store##Type##EphemeronKeyWriteBarrier##Operator final             \
     564             :       : public Store##Type##Operator {                                     \
     565             :     Store##Type##EphemeronKeyWriteBarrier##Operator()                      \
     566             :         : Store##Type##Operator(kEphemeronKeyWriteBarrier) {}              \
     567             :   };                                                                       \
     568             :   struct Store##Type##FullWriteBarrier##Operator final                     \
     569             :       : public Store##Type##Operator {                                     \
     570             :     Store##Type##FullWriteBarrier##Operator()                              \
     571             :         : Store##Type##Operator(kFullWriteBarrier) {}                      \
     572             :   };                                                                       \
     573             :   struct UnalignedStore##Type##Operator final                              \
     574             :       : public Operator1<UnalignedStoreRepresentation> {                   \
     575             :     UnalignedStore##Type##Operator()                                       \
     576             :         : Operator1<UnalignedStoreRepresentation>(                         \
     577             :               IrOpcode::kUnalignedStore,                                   \
     578             :               Operator::kNoDeopt | Operator::kNoRead | Operator::kNoThrow, \
     579             :               "UnalignedStore", 3, 1, 1, 0, 1, 0,                          \
     580             :               MachineRepresentation::Type) {}                              \
     581             :   };                                                                       \
     582             :   struct ProtectedStore##Type##Operator                                    \
     583             :       : public Operator1<StoreRepresentation> {                            \
     584             :     explicit ProtectedStore##Type##Operator()                              \
     585             :         : Operator1<StoreRepresentation>(                                  \
     586             :               IrOpcode::kProtectedStore,                                   \
     587             :               Operator::kNoDeopt | Operator::kNoRead | Operator::kNoThrow, \
     588             :               "Store", 3, 1, 1, 0, 1, 0,                                   \
     589             :               StoreRepresentation(MachineRepresentation::Type,             \
     590             :                                   kNoWriteBarrier)) {}                     \
     591             :   };                                                                       \
     592             :   Store##Type##NoWriteBarrier##Operator kStore##Type##NoWriteBarrier;      \
     593             :   Store##Type##MapWriteBarrier##Operator kStore##Type##MapWriteBarrier;    \
     594             :   Store##Type##PointerWriteBarrier##Operator                               \
     595             :       kStore##Type##PointerWriteBarrier;                                   \
     596             :   Store##Type##EphemeronKeyWriteBarrier##Operator                          \
     597             :       kStore##Type##EphemeronKeyWriteBarrier;                              \
     598             :   Store##Type##FullWriteBarrier##Operator kStore##Type##FullWriteBarrier;  \
     599             :   UnalignedStore##Type##Operator kUnalignedStore##Type;                    \
     600             :   ProtectedStore##Type##Operator kProtectedStore##Type;
     601     5723835 :   MACHINE_REPRESENTATION_LIST(STORE)
     602             : #undef STORE
     603             : 
     604             : #define ATOMIC_LOAD(Type)                                                   \
     605             :   struct Word32AtomicLoad##Type##Operator final                             \
     606             :       : public Operator1<LoadRepresentation> {                              \
     607             :     Word32AtomicLoad##Type##Operator()                                      \
     608             :         : Operator1<LoadRepresentation>(                                    \
     609             :               IrOpcode::kWord32AtomicLoad,                                  \
     610             :               Operator::kNoDeopt | Operator::kNoThrow | Operator::kNoWrite, \
     611             :               "Word32AtomicLoad", 2, 1, 1, 1, 1, 0, MachineType::Type()) {} \
     612             :   };                                                                        \
     613             :   Word32AtomicLoad##Type##Operator kWord32AtomicLoad##Type;
     614      352236 :   ATOMIC_TYPE_LIST(ATOMIC_LOAD)
     615             : #undef ATOMIC_LOAD
     616             : 
     617             : #define ATOMIC_LOAD(Type)                                                   \
     618             :   struct Word64AtomicLoad##Type##Operator final                             \
     619             :       : public Operator1<LoadRepresentation> {                              \
     620             :     Word64AtomicLoad##Type##Operator()                                      \
     621             :         : Operator1<LoadRepresentation>(                                    \
     622             :               IrOpcode::kWord64AtomicLoad,                                  \
     623             :               Operator::kNoDeopt | Operator::kNoThrow | Operator::kNoWrite, \
     624             :               "Word64AtomicLoad", 2, 1, 1, 1, 1, 0, MachineType::Type()) {} \
     625             :   };                                                                        \
     626             :   Word64AtomicLoad##Type##Operator kWord64AtomicLoad##Type;
     627      234824 :   ATOMIC_U64_TYPE_LIST(ATOMIC_LOAD)
     628             : #undef ATOMIC_LOAD
     629             : 
     630             : #define ATOMIC_STORE(Type)                                                 \
     631             :   struct Word32AtomicStore##Type##Operator                                 \
     632             :       : public Operator1<MachineRepresentation> {                          \
     633             :     Word32AtomicStore##Type##Operator()                                    \
     634             :         : Operator1<MachineRepresentation>(                                \
     635             :               IrOpcode::kWord32AtomicStore,                                \
     636             :               Operator::kNoDeopt | Operator::kNoRead | Operator::kNoThrow, \
     637             :               "Word32AtomicStore", 3, 1, 1, 0, 1, 0,                       \
     638             :               MachineRepresentation::Type) {}                              \
     639             :   };                                                                       \
     640             :   Word32AtomicStore##Type##Operator kWord32AtomicStore##Type;
     641      176118 :   ATOMIC_REPRESENTATION_LIST(ATOMIC_STORE)
     642             : #undef ATOMIC_STORE
     643             : 
     644             : #define ATOMIC_STORE(Type)                                                 \
     645             :   struct Word64AtomicStore##Type##Operator                                 \
     646             :       : public Operator1<MachineRepresentation> {                          \
     647             :     Word64AtomicStore##Type##Operator()                                    \
     648             :         : Operator1<MachineRepresentation>(                                \
     649             :               IrOpcode::kWord64AtomicStore,                                \
     650             :               Operator::kNoDeopt | Operator::kNoRead | Operator::kNoThrow, \
     651             :               "Word64AtomicStore", 3, 1, 1, 0, 1, 0,                       \
     652             :               MachineRepresentation::Type) {}                              \
     653             :   };                                                                       \
     654             :   Word64AtomicStore##Type##Operator kWord64AtomicStore##Type;
     655      234824 :   ATOMIC64_REPRESENTATION_LIST(ATOMIC_STORE)
     656             : #undef ATOMIC_STORE
     657             : 
     658             : #define ATOMIC_OP(op, type)                                                    \
     659             :   struct op##type##Operator : public Operator1<MachineType> {                  \
     660             :     op##type##Operator()                                                       \
     661             :         : Operator1<MachineType>(IrOpcode::k##op,                              \
     662             :                                  Operator::kNoDeopt | Operator::kNoThrow, #op, \
     663             :                                  3, 1, 1, 1, 1, 0, MachineType::type()) {}     \
     664             :   };                                                                           \
     665             :   op##type##Operator k##op##type;
     666             : #define ATOMIC_OP_LIST(type)       \
     667             :   ATOMIC_OP(Word32AtomicAdd, type) \
     668             :   ATOMIC_OP(Word32AtomicSub, type) \
     669             :   ATOMIC_OP(Word32AtomicAnd, type) \
     670             :   ATOMIC_OP(Word32AtomicOr, type)  \
     671             :   ATOMIC_OP(Word32AtomicXor, type) \
     672             :   ATOMIC_OP(Word32AtomicExchange, type)
     673     2113416 :   ATOMIC_TYPE_LIST(ATOMIC_OP_LIST)
     674             : #undef ATOMIC_OP_LIST
     675             : #define ATOMIC64_OP_LIST(type)     \
     676             :   ATOMIC_OP(Word64AtomicAdd, type) \
     677             :   ATOMIC_OP(Word64AtomicSub, type) \
     678             :   ATOMIC_OP(Word64AtomicAnd, type) \
     679             :   ATOMIC_OP(Word64AtomicOr, type)  \
     680             :   ATOMIC_OP(Word64AtomicXor, type) \
     681             :   ATOMIC_OP(Word64AtomicExchange, type)
     682     1408944 :   ATOMIC_U64_TYPE_LIST(ATOMIC64_OP_LIST)
     683             : #undef ATOMIC64_OP_LIST
     684             : #undef ATOMIC_OP
     685             : 
     686             : #define ATOMIC_COMPARE_EXCHANGE(Type)                                          \
     687             :   struct Word32AtomicCompareExchange##Type##Operator                           \
     688             :       : public Operator1<MachineType> {                                        \
     689             :     Word32AtomicCompareExchange##Type##Operator()                              \
     690             :         : Operator1<MachineType>(IrOpcode::kWord32AtomicCompareExchange,       \
     691             :                                  Operator::kNoDeopt | Operator::kNoThrow,      \
     692             :                                  "Word32AtomicCompareExchange", 4, 1, 1, 1, 1, \
     693             :                                  0, MachineType::Type()) {}                    \
     694             :   };                                                                           \
     695             :   Word32AtomicCompareExchange##Type##Operator                                  \
     696             :       kWord32AtomicCompareExchange##Type;
     697      352236 :   ATOMIC_TYPE_LIST(ATOMIC_COMPARE_EXCHANGE)
     698             : #undef ATOMIC_COMPARE_EXCHANGE
     699             : 
     700             : #define ATOMIC_COMPARE_EXCHANGE(Type)                                          \
     701             :   struct Word64AtomicCompareExchange##Type##Operator                           \
     702             :       : public Operator1<MachineType> {                                        \
     703             :     Word64AtomicCompareExchange##Type##Operator()                              \
     704             :         : Operator1<MachineType>(IrOpcode::kWord64AtomicCompareExchange,       \
     705             :                                  Operator::kNoDeopt | Operator::kNoThrow,      \
     706             :                                  "Word64AtomicCompareExchange", 4, 1, 1, 1, 1, \
     707             :                                  0, MachineType::Type()) {}                    \
     708             :   };                                                                           \
     709             :   Word64AtomicCompareExchange##Type##Operator                                  \
     710             :       kWord64AtomicCompareExchange##Type;
     711      234824 :   ATOMIC_U64_TYPE_LIST(ATOMIC_COMPARE_EXCHANGE)
     712             : #undef ATOMIC_COMPARE_EXCHANGE
     713             : 
     714           0 :   struct Word32AtomicPairLoadOperator : public Operator {
     715       29353 :     Word32AtomicPairLoadOperator()
     716             :         : Operator(IrOpcode::kWord32AtomicPairLoad,
     717             :                    Operator::kNoDeopt | Operator::kNoThrow,
     718       29353 :                    "Word32AtomicPairLoad", 2, 1, 1, 2, 1, 0) {}
     719             :   };
     720             :   Word32AtomicPairLoadOperator kWord32AtomicPairLoad;
     721             : 
     722           0 :   struct Word32AtomicPairStoreOperator : public Operator {
     723       29353 :     Word32AtomicPairStoreOperator()
     724             :         : Operator(IrOpcode::kWord32AtomicPairStore,
     725             :                    Operator::kNoDeopt | Operator::kNoThrow,
     726       29353 :                    "Word32AtomicPairStore", 4, 1, 1, 0, 1, 0) {}
     727             :   };
     728             :   Word32AtomicPairStoreOperator kWord32AtomicPairStore;
     729             : 
     730             : #define ATOMIC_PAIR_OP(op)                                      \
     731             :   struct Word32AtomicPair##op##Operator : public Operator {     \
     732             :     Word32AtomicPair##op##Operator()                            \
     733             :         : Operator(IrOpcode::kWord32AtomicPair##op,             \
     734             :                    Operator::kNoDeopt | Operator::kNoThrow,     \
     735             :                    "Word32AtomicPair##op", 4, 1, 1, 2, 1, 0) {} \
     736             :   };                                                            \
     737             :   Word32AtomicPair##op##Operator kWord32AtomicPair##op;
     738      176118 :   ATOMIC_PAIR_BINOP_LIST(ATOMIC_PAIR_OP)
     739             : #undef ATOMIC_PAIR_OP
     740             : #undef ATOMIC_PAIR_BINOP_LIST
     741             : 
     742           0 :   struct Word32AtomicPairCompareExchangeOperator : public Operator {
     743       29353 :     Word32AtomicPairCompareExchangeOperator()
     744             :         : Operator(IrOpcode::kWord32AtomicPairCompareExchange,
     745             :                    Operator::kNoDeopt | Operator::kNoThrow,
     746       29353 :                    "Word32AtomicPairCompareExchange", 6, 1, 1, 2, 1, 0) {}
     747             :   };
     748             :   Word32AtomicPairCompareExchangeOperator kWord32AtomicPairCompareExchange;
     749             : 
     750             :   // The {BitcastWordToTagged} operator must not be marked as pure (especially
     751             :   // not idempotent), because otherwise the splitting logic in the Scheduler
     752             :   // might decide to split these operators, thus potentially creating live
     753             :   // ranges of allocation top across calls or other things that might allocate.
     754             :   // See https://bugs.chromium.org/p/v8/issues/detail?id=6059 for more details.
     755           0 :   struct BitcastWordToTaggedOperator : public Operator {
     756       29353 :     BitcastWordToTaggedOperator()
     757             :         : Operator(IrOpcode::kBitcastWordToTagged,
     758             :                    Operator::kEliminatable | Operator::kNoWrite,
     759       29353 :                    "BitcastWordToTagged", 1, 1, 1, 1, 1, 0) {}
     760             :   };
     761             :   BitcastWordToTaggedOperator kBitcastWordToTagged;
     762             : 
     763           0 :   struct BitcastTaggedToWordOperator : public Operator {
     764       29353 :     BitcastTaggedToWordOperator()
     765             :         : Operator(IrOpcode::kBitcastTaggedToWord,
     766             :                    Operator::kEliminatable | Operator::kNoWrite,
     767       29353 :                    "BitcastTaggedToWord", 1, 1, 1, 1, 1, 0) {}
     768             :   };
     769             :   BitcastTaggedToWordOperator kBitcastTaggedToWord;
     770             : 
     771           0 :   struct BitcastMaybeObjectToWordOperator : public Operator {
     772       29353 :     BitcastMaybeObjectToWordOperator()
     773             :         : Operator(IrOpcode::kBitcastTaggedToWord,
     774             :                    Operator::kEliminatable | Operator::kNoWrite,
     775       29353 :                    "BitcastMaybeObjectToWord", 1, 1, 1, 1, 1, 0) {}
     776             :   };
     777             :   BitcastMaybeObjectToWordOperator kBitcastMaybeObjectToWord;
     778             : 
     779           0 :   struct TaggedPoisonOnSpeculation : public Operator {
     780       29353 :     TaggedPoisonOnSpeculation()
     781             :         : Operator(IrOpcode::kTaggedPoisonOnSpeculation,
     782             :                    Operator::kEliminatable | Operator::kNoWrite,
     783       29353 :                    "TaggedPoisonOnSpeculation", 1, 1, 1, 1, 1, 0) {}
     784             :   };
     785             :   TaggedPoisonOnSpeculation kTaggedPoisonOnSpeculation;
     786             : 
     787           0 :   struct Word32PoisonOnSpeculation : public Operator {
     788       29353 :     Word32PoisonOnSpeculation()
     789             :         : Operator(IrOpcode::kWord32PoisonOnSpeculation,
     790             :                    Operator::kEliminatable | Operator::kNoWrite,
     791       29353 :                    "Word32PoisonOnSpeculation", 1, 1, 1, 1, 1, 0) {}
     792             :   };
     793             :   Word32PoisonOnSpeculation kWord32PoisonOnSpeculation;
     794             : 
     795           0 :   struct Word64PoisonOnSpeculation : public Operator {
     796       29353 :     Word64PoisonOnSpeculation()
     797             :         : Operator(IrOpcode::kWord64PoisonOnSpeculation,
     798             :                    Operator::kEliminatable | Operator::kNoWrite,
     799       29353 :                    "Word64PoisonOnSpeculation", 1, 1, 1, 1, 1, 0) {}
     800             :   };
     801             :   Word64PoisonOnSpeculation kWord64PoisonOnSpeculation;
     802             : 
     803           0 :   struct DebugAbortOperator : public Operator {
     804       29353 :     DebugAbortOperator()
     805             :         : Operator(IrOpcode::kDebugAbort, Operator::kNoThrow, "DebugAbort", 1,
     806       29353 :                    1, 1, 0, 1, 0) {}
     807             :   };
     808             :   DebugAbortOperator kDebugAbort;
     809             : 
     810           0 :   struct DebugBreakOperator : public Operator {
     811       29353 :     DebugBreakOperator()
     812             :         : Operator(IrOpcode::kDebugBreak, Operator::kNoThrow, "DebugBreak", 0,
     813       29353 :                    1, 1, 0, 1, 0) {}
     814             :   };
     815             :   DebugBreakOperator kDebugBreak;
     816             : 
     817           0 :   struct UnsafePointerAddOperator final : public Operator {
     818       29353 :     UnsafePointerAddOperator()
     819             :         : Operator(IrOpcode::kUnsafePointerAdd, Operator::kKontrol,
     820       29353 :                    "UnsafePointerAdd", 2, 1, 1, 1, 1, 0) {}
     821             :   };
     822             :   UnsafePointerAddOperator kUnsafePointerAdd;
     823             : };
     824             : 
     825           0 : struct CommentOperator : public Operator1<const char*> {
     826           4 :   explicit CommentOperator(const char* msg)
     827             :       : Operator1<const char*>(IrOpcode::kComment, Operator::kNoThrow,
     828           4 :                                "Comment", 0, 1, 1, 0, 1, 0, msg) {}
     829             : };
     830             : 
     831             : namespace {
     832     5315321 : DEFINE_LAZY_LEAKY_OBJECT_GETTER(MachineOperatorGlobalCache,
     833             :                                 GetMachineOperatorGlobalCache)
     834             : }
     835             : 
     836     5285809 : MachineOperatorBuilder::MachineOperatorBuilder(
     837             :     Zone* zone, MachineRepresentation word, Flags flags,
     838             :     AlignmentRequirements alignmentRequirements)
     839             :     : zone_(zone),
     840     5285809 :       cache_(*GetMachineOperatorGlobalCache()),
     841             :       word_(word),
     842             :       flags_(flags),
     843    10571730 :       alignment_requirements_(alignmentRequirements) {
     844             :   DCHECK(word == MachineRepresentation::kWord32 ||
     845             :          word == MachineRepresentation::kWord64);
     846     5285921 : }
     847             : 
     848           2 : const Operator* MachineOperatorBuilder::UnalignedLoad(LoadRepresentation rep) {
     849             : #define LOAD(Type)                       \
     850             :   if (rep == MachineType::Type()) {      \
     851             :     return &cache_.kUnalignedLoad##Type; \
     852             :   }
     853          18 :   MACHINE_TYPE_LIST(LOAD)
     854             : #undef LOAD
     855           0 :   UNREACHABLE();
     856             : }
     857             : 
     858           2 : const Operator* MachineOperatorBuilder::UnalignedStore(
     859             :     UnalignedStoreRepresentation rep) {
     860           2 :   switch (rep) {
     861             : #define STORE(kRep)                 \
     862             :   case MachineRepresentation::kRep: \
     863             :     return &cache_.kUnalignedStore##kRep;
     864           0 :     MACHINE_REPRESENTATION_LIST(STORE)
     865             : #undef STORE
     866             :     case MachineRepresentation::kBit:
     867             :     case MachineRepresentation::kNone:
     868             :       break;
     869             :   }
     870           0 :   UNREACHABLE();
     871             : }
     872             : 
     873             : #define PURE(Name, properties, value_input_count, control_input_count, \
     874             :              output_count)                                             \
     875             :   const Operator* MachineOperatorBuilder::Name() { return &cache_.k##Name; }
     876    14178044 : MACHINE_PURE_OP_LIST(PURE)
     877             : #undef PURE
     878             : 
     879             : #define PURE(Name, properties, value_input_count, control_input_count, \
     880             :              output_count)                                             \
     881             :   const OptionalOperator MachineOperatorBuilder::Name() {              \
     882             :     return OptionalOperator(flags_ & k##Name, &cache_.k##Name);        \
     883             :   }
     884      297561 : PURE_OPTIONAL_OP_LIST(PURE)
     885             : #undef PURE
     886             : 
     887             : #define OVERFLOW_OP(Name, properties) \
     888             :   const Operator* MachineOperatorBuilder::Name() { return &cache_.k##Name; }
     889      206716 : OVERFLOW_OP_LIST(OVERFLOW_OP)
     890             : #undef OVERFLOW_OP
     891             : 
     892     9204003 : const Operator* MachineOperatorBuilder::Load(LoadRepresentation rep) {
     893             : #define LOAD(Type)                  \
     894             :   if (rep == MachineType::Type()) { \
     895             :     return &cache_.kLoad##Type;     \
     896             :   }
     897   108590093 :     MACHINE_TYPE_LIST(LOAD)
     898             : #undef LOAD
     899           0 :   UNREACHABLE();
     900             : }
     901             : 
     902        1269 : const Operator* MachineOperatorBuilder::PoisonedLoad(LoadRepresentation rep) {
     903             : #define LOAD(Type)                      \
     904             :   if (rep == MachineType::Type()) {     \
     905             :     return &cache_.kPoisonedLoad##Type; \
     906             :   }
     907       13329 :   MACHINE_TYPE_LIST(LOAD)
     908             : #undef LOAD
     909           0 :   UNREACHABLE();
     910             : }
     911             : 
     912       97243 : const Operator* MachineOperatorBuilder::ProtectedLoad(LoadRepresentation rep) {
     913             : #define LOAD(Type)                       \
     914             :   if (rep == MachineType::Type()) {      \
     915             :     return &cache_.kProtectedLoad##Type; \
     916             :   }
     917      824932 :   MACHINE_TYPE_LIST(LOAD)
     918             : #undef LOAD
     919           0 :   UNREACHABLE();
     920             : }
     921             : 
     922      367611 : const Operator* MachineOperatorBuilder::StackSlot(int size, int alignment) {
     923             :   DCHECK_LE(0, size);
     924             :   DCHECK(alignment == 0 || alignment == 4 || alignment == 8 || alignment == 16);
     925             : #define CASE_CACHED_SIZE(Size, Alignment)                          \
     926             :   if (size == Size && alignment == Alignment) {                    \
     927             :     return &cache_.kStackSlotOfSize##Size##OfAlignment##Alignment; \
     928             :   }
     929             : 
     930      367611 :   STACK_SLOT_CACHED_SIZES_ALIGNMENTS_LIST(CASE_CACHED_SIZE)
     931             : 
     932             : #undef CASE_CACHED_SIZE
     933      729816 :   return new (zone_) StackSlotOperator(size, alignment);
     934             : }
     935             : 
     936          18 : const Operator* MachineOperatorBuilder::StackSlot(MachineRepresentation rep,
     937             :                                                   int alignment) {
     938          18 :   return StackSlot(1 << ElementSizeLog2Of(rep), alignment);
     939             : }
     940             : 
     941     4302929 : const Operator* MachineOperatorBuilder::Store(StoreRepresentation store_rep) {
     942     4302929 :   switch (store_rep.representation()) {
     943             : #define STORE(kRep)                                              \
     944             :   case MachineRepresentation::kRep:                              \
     945             :     switch (store_rep.write_barrier_kind()) {                    \
     946             :       case kNoWriteBarrier:                                      \
     947             :         return &cache_.k##Store##kRep##NoWriteBarrier;           \
     948             :       case kMapWriteBarrier:                                     \
     949             :         return &cache_.k##Store##kRep##MapWriteBarrier;          \
     950             :       case kPointerWriteBarrier:                                 \
     951             :         return &cache_.k##Store##kRep##PointerWriteBarrier;      \
     952             :       case kEphemeronKeyWriteBarrier:                            \
     953             :         return &cache_.k##Store##kRep##EphemeronKeyWriteBarrier; \
     954             :       case kFullWriteBarrier:                                    \
     955             :         return &cache_.k##Store##kRep##FullWriteBarrier;         \
     956             :     }                                                            \
     957             :     break;
     958       12327 :     MACHINE_REPRESENTATION_LIST(STORE)
     959             : #undef STORE
     960             :     case MachineRepresentation::kBit:
     961             :     case MachineRepresentation::kNone:
     962             :       break;
     963             :   }
     964           5 :   UNREACHABLE();
     965             : }
     966             : 
     967      144842 : const Operator* MachineOperatorBuilder::ProtectedStore(
     968             :     MachineRepresentation rep) {
     969      144842 :   switch (rep) {
     970             : #define STORE(kRep)                       \
     971             :   case MachineRepresentation::kRep:       \
     972             :     return &cache_.kProtectedStore##kRep; \
     973             :     break;
     974         262 :     MACHINE_REPRESENTATION_LIST(STORE)
     975             : #undef STORE
     976             :     case MachineRepresentation::kBit:
     977             :     case MachineRepresentation::kNone:
     978             :       break;
     979             :   }
     980           0 :   UNREACHABLE();
     981             : }
     982             : 
     983        6796 : const Operator* MachineOperatorBuilder::UnsafePointerAdd() {
     984        6796 :   return &cache_.kUnsafePointerAdd;
     985             : }
     986             : 
     987      371688 : const Operator* MachineOperatorBuilder::BitcastWordToTagged() {
     988      371688 :   return &cache_.kBitcastWordToTagged;
     989             : }
     990             : 
     991      898232 : const Operator* MachineOperatorBuilder::BitcastTaggedToWord() {
     992      898232 :   return &cache_.kBitcastTaggedToWord;
     993             : }
     994             : 
     995       24868 : const Operator* MachineOperatorBuilder::BitcastMaybeObjectToWord() {
     996       24868 :   return &cache_.kBitcastMaybeObjectToWord;
     997             : }
     998             : 
     999         440 : const Operator* MachineOperatorBuilder::DebugAbort() {
    1000         440 :   return &cache_.kDebugAbort;
    1001             : }
    1002             : 
    1003      136768 : const Operator* MachineOperatorBuilder::DebugBreak() {
    1004      136768 :   return &cache_.kDebugBreak;
    1005             : }
    1006             : 
    1007           4 : const Operator* MachineOperatorBuilder::Comment(const char* msg) {
    1008           8 :   return new (zone_) CommentOperator(msg);
    1009             : }
    1010             : 
    1011        2153 : const Operator* MachineOperatorBuilder::Word32AtomicLoad(
    1012             :     LoadRepresentation rep) {
    1013             : #define LOAD(Type)                          \
    1014             :   if (rep == MachineType::Type()) {         \
    1015             :     return &cache_.kWord32AtomicLoad##Type; \
    1016             :   }
    1017        4687 :   ATOMIC_TYPE_LIST(LOAD)
    1018             : #undef LOAD
    1019           0 :   UNREACHABLE();
    1020             : }
    1021             : 
    1022        1965 : const Operator* MachineOperatorBuilder::Word32AtomicStore(
    1023             :     MachineRepresentation rep) {
    1024             : #define STORE(kRep)                          \
    1025             :   if (rep == MachineRepresentation::kRep) {  \
    1026             :     return &cache_.kWord32AtomicStore##kRep; \
    1027             :   }
    1028        1965 :   ATOMIC_REPRESENTATION_LIST(STORE)
    1029             : #undef STORE
    1030           0 :   UNREACHABLE();
    1031             : }
    1032             : 
    1033        2552 : const Operator* MachineOperatorBuilder::Word32AtomicExchange(MachineType type) {
    1034             : #define EXCHANGE(kType)                          \
    1035             :   if (type == MachineType::kType()) {            \
    1036             :     return &cache_.kWord32AtomicExchange##kType; \
    1037             :   }
    1038        4950 :   ATOMIC_TYPE_LIST(EXCHANGE)
    1039             : #undef EXCHANGE
    1040           0 :   UNREACHABLE();
    1041             : }
    1042             : 
    1043         418 : const Operator* MachineOperatorBuilder::Word32AtomicCompareExchange(
    1044             :     MachineType type) {
    1045             : #define COMPARE_EXCHANGE(kType)                         \
    1046             :   if (type == MachineType::kType()) {                   \
    1047             :     return &cache_.kWord32AtomicCompareExchange##kType; \
    1048             :   }
    1049        1359 :   ATOMIC_TYPE_LIST(COMPARE_EXCHANGE)
    1050             : #undef COMPARE_EXCHANGE
    1051           0 :   UNREACHABLE();
    1052             : }
    1053             : 
    1054        2328 : const Operator* MachineOperatorBuilder::Word32AtomicAdd(MachineType type) {
    1055             : #define ADD(kType)                          \
    1056             :   if (type == MachineType::kType()) {       \
    1057             :     return &cache_.kWord32AtomicAdd##kType; \
    1058             :   }
    1059        4839 :   ATOMIC_TYPE_LIST(ADD)
    1060             : #undef ADD
    1061           0 :   UNREACHABLE();
    1062             : }
    1063             : 
    1064        2345 : const Operator* MachineOperatorBuilder::Word32AtomicSub(MachineType type) {
    1065             : #define SUB(kType)                          \
    1066             :   if (type == MachineType::kType()) {       \
    1067             :     return &cache_.kWord32AtomicSub##kType; \
    1068             :   }
    1069        4936 :   ATOMIC_TYPE_LIST(SUB)
    1070             : #undef SUB
    1071           0 :   UNREACHABLE();
    1072             : }
    1073             : 
    1074        2250 : const Operator* MachineOperatorBuilder::Word32AtomicAnd(MachineType type) {
    1075             : #define AND(kType)                          \
    1076             :   if (type == MachineType::kType()) {       \
    1077             :     return &cache_.kWord32AtomicAnd##kType; \
    1078             :   }
    1079        4657 :   ATOMIC_TYPE_LIST(AND)
    1080             : #undef AND
    1081           0 :   UNREACHABLE();
    1082             : }
    1083             : 
    1084        1982 : const Operator* MachineOperatorBuilder::Word32AtomicOr(MachineType type) {
    1085             : #define OR(kType)                          \
    1086             :   if (type == MachineType::kType()) {      \
    1087             :     return &cache_.kWord32AtomicOr##kType; \
    1088             :   }
    1089        4201 :   ATOMIC_TYPE_LIST(OR)
    1090             : #undef OR
    1091           0 :   UNREACHABLE();
    1092             : }
    1093             : 
    1094        2307 : const Operator* MachineOperatorBuilder::Word32AtomicXor(MachineType type) {
    1095             : #define XOR(kType)                          \
    1096             :   if (type == MachineType::kType()) {       \
    1097             :     return &cache_.kWord32AtomicXor##kType; \
    1098             :   }
    1099        4656 :   ATOMIC_TYPE_LIST(XOR)
    1100             : #undef XOR
    1101           0 :   UNREACHABLE();
    1102             : }
    1103             : 
    1104        2438 : const Operator* MachineOperatorBuilder::Word64AtomicLoad(
    1105             :     LoadRepresentation rep) {
    1106             : #define LOAD(Type)                          \
    1107             :   if (rep == MachineType::Type()) {         \
    1108             :     return &cache_.kWord64AtomicLoad##Type; \
    1109             :   }
    1110        5526 :   ATOMIC_U64_TYPE_LIST(LOAD)
    1111             : #undef LOAD
    1112           0 :   UNREACHABLE();
    1113             : }
    1114             : 
    1115        1980 : const Operator* MachineOperatorBuilder::Word64AtomicStore(
    1116             :     MachineRepresentation rep) {
    1117             : #define STORE(kRep)                          \
    1118             :   if (rep == MachineRepresentation::kRep) {  \
    1119             :     return &cache_.kWord64AtomicStore##kRep; \
    1120             :   }
    1121        1980 :   ATOMIC64_REPRESENTATION_LIST(STORE)
    1122             : #undef STORE
    1123           0 :   UNREACHABLE();
    1124             : }
    1125             : 
    1126        1839 : const Operator* MachineOperatorBuilder::Word64AtomicAdd(MachineType type) {
    1127             : #define ADD(kType)                          \
    1128             :   if (type == MachineType::kType()) {       \
    1129             :     return &cache_.kWord64AtomicAdd##kType; \
    1130             :   }
    1131        4262 :   ATOMIC_U64_TYPE_LIST(ADD)
    1132             : #undef ADD
    1133           0 :   UNREACHABLE();
    1134             : }
    1135             : 
    1136        2516 : const Operator* MachineOperatorBuilder::Word64AtomicSub(MachineType type) {
    1137             : #define SUB(kType)                          \
    1138             :   if (type == MachineType::kType()) {       \
    1139             :     return &cache_.kWord64AtomicSub##kType; \
    1140             :   }
    1141        5396 :   ATOMIC_U64_TYPE_LIST(SUB)
    1142             : #undef SUB
    1143           0 :   UNREACHABLE();
    1144             : }
    1145             : 
    1146        2378 : const Operator* MachineOperatorBuilder::Word64AtomicAnd(MachineType type) {
    1147             : #define AND(kType)                          \
    1148             :   if (type == MachineType::kType()) {       \
    1149             :     return &cache_.kWord64AtomicAnd##kType; \
    1150             :   }
    1151        5250 :   ATOMIC_U64_TYPE_LIST(AND)
    1152             : #undef AND
    1153           0 :   UNREACHABLE();
    1154             : }
    1155             : 
    1156        2100 : const Operator* MachineOperatorBuilder::Word64AtomicOr(MachineType type) {
    1157             : #define OR(kType)                          \
    1158             :   if (type == MachineType::kType()) {      \
    1159             :     return &cache_.kWord64AtomicOr##kType; \
    1160             :   }
    1161        4636 :   ATOMIC_U64_TYPE_LIST(OR)
    1162             : #undef OR
    1163           0 :   UNREACHABLE();
    1164             : }
    1165             : 
    1166        2456 : const Operator* MachineOperatorBuilder::Word64AtomicXor(MachineType type) {
    1167             : #define XOR(kType)                          \
    1168             :   if (type == MachineType::kType()) {       \
    1169             :     return &cache_.kWord64AtomicXor##kType; \
    1170             :   }
    1171        5194 :   ATOMIC_U64_TYPE_LIST(XOR)
    1172             : #undef XOR
    1173           0 :   UNREACHABLE();
    1174             : }
    1175             : 
    1176        2222 : const Operator* MachineOperatorBuilder::Word64AtomicExchange(MachineType type) {
    1177             : #define EXCHANGE(kType)                          \
    1178             :   if (type == MachineType::kType()) {            \
    1179             :     return &cache_.kWord64AtomicExchange##kType; \
    1180             :   }
    1181        4666 :   ATOMIC_U64_TYPE_LIST(EXCHANGE)
    1182             : #undef EXCHANGE
    1183           0 :   UNREACHABLE();
    1184             : }
    1185             : 
    1186         244 : const Operator* MachineOperatorBuilder::Word64AtomicCompareExchange(
    1187             :     MachineType type) {
    1188             : #define COMPARE_EXCHANGE(kType)                         \
    1189             :   if (type == MachineType::kType()) {                   \
    1190             :     return &cache_.kWord64AtomicCompareExchange##kType; \
    1191             :   }
    1192         826 :   ATOMIC_U64_TYPE_LIST(COMPARE_EXCHANGE)
    1193             : #undef COMPARE_EXCHANGE
    1194           0 :   UNREACHABLE();
    1195             : }
    1196             : 
    1197           0 : const Operator* MachineOperatorBuilder::Word32AtomicPairLoad() {
    1198           0 :   return &cache_.kWord32AtomicPairLoad;
    1199             : }
    1200             : 
    1201           0 : const Operator* MachineOperatorBuilder::Word32AtomicPairStore() {
    1202           0 :   return &cache_.kWord32AtomicPairStore;
    1203             : }
    1204             : 
    1205           0 : const Operator* MachineOperatorBuilder::Word32AtomicPairAdd() {
    1206           0 :   return &cache_.kWord32AtomicPairAdd;
    1207             : }
    1208             : 
    1209           0 : const Operator* MachineOperatorBuilder::Word32AtomicPairSub() {
    1210           0 :   return &cache_.kWord32AtomicPairSub;
    1211             : }
    1212             : 
    1213           0 : const Operator* MachineOperatorBuilder::Word32AtomicPairAnd() {
    1214           0 :   return &cache_.kWord32AtomicPairAnd;
    1215             : }
    1216             : 
    1217           0 : const Operator* MachineOperatorBuilder::Word32AtomicPairOr() {
    1218           0 :   return &cache_.kWord32AtomicPairOr;
    1219             : }
    1220             : 
    1221           0 : const Operator* MachineOperatorBuilder::Word32AtomicPairXor() {
    1222           0 :   return &cache_.kWord32AtomicPairXor;
    1223             : }
    1224             : 
    1225           0 : const Operator* MachineOperatorBuilder::Word32AtomicPairExchange() {
    1226           0 :   return &cache_.kWord32AtomicPairExchange;
    1227             : }
    1228             : 
    1229           0 : const Operator* MachineOperatorBuilder::Word32AtomicPairCompareExchange() {
    1230           0 :   return &cache_.kWord32AtomicPairCompareExchange;
    1231             : }
    1232             : 
    1233         856 : const Operator* MachineOperatorBuilder::TaggedPoisonOnSpeculation() {
    1234         856 :   return &cache_.kTaggedPoisonOnSpeculation;
    1235             : }
    1236             : 
    1237           0 : const Operator* MachineOperatorBuilder::Word32PoisonOnSpeculation() {
    1238           0 :   return &cache_.kWord32PoisonOnSpeculation;
    1239             : }
    1240             : 
    1241           0 : const Operator* MachineOperatorBuilder::Word64PoisonOnSpeculation() {
    1242           0 :   return &cache_.kWord64PoisonOnSpeculation;
    1243             : }
    1244             : 
    1245             : #define SIMD_LANE_OPS(Type, lane_count)                                     \
    1246             :   const Operator* MachineOperatorBuilder::Type##ExtractLane(                \
    1247             :       int32_t lane_index) {                                                 \
    1248             :     DCHECK(0 <= lane_index && lane_index < lane_count);                     \
    1249             :     return new (zone_)                                                      \
    1250             :         Operator1<int32_t>(IrOpcode::k##Type##ExtractLane, Operator::kPure, \
    1251             :                            "Extract lane", 1, 0, 0, 1, 0, 0, lane_index);   \
    1252             :   }                                                                         \
    1253             :   const Operator* MachineOperatorBuilder::Type##ReplaceLane(                \
    1254             :       int32_t lane_index) {                                                 \
    1255             :     DCHECK(0 <= lane_index && lane_index < lane_count);                     \
    1256             :     return new (zone_)                                                      \
    1257             :         Operator1<int32_t>(IrOpcode::k##Type##ReplaceLane, Operator::kPure, \
    1258             :                            "Replace lane", 2, 0, 0, 1, 0, 0, lane_index);   \
    1259             :   }
    1260        8722 : SIMD_LANE_OP_LIST(SIMD_LANE_OPS)
    1261             : #undef SIMD_LANE_OPS
    1262             : 
    1263             : #define SIMD_SHIFT_OPS(format, bits)                                           \
    1264             :   const Operator* MachineOperatorBuilder::I##format##Shl(int32_t shift) {      \
    1265             :     DCHECK(0 <= shift && shift < bits);                                        \
    1266             :     return new (zone_)                                                         \
    1267             :         Operator1<int32_t>(IrOpcode::kI##format##Shl, Operator::kPure,         \
    1268             :                            "Shift left", 1, 0, 0, 1, 0, 0, shift);             \
    1269             :   }                                                                            \
    1270             :   const Operator* MachineOperatorBuilder::I##format##ShrS(int32_t shift) {     \
    1271             :     DCHECK(0 < shift && shift <= bits);                                        \
    1272             :     return new (zone_)                                                         \
    1273             :         Operator1<int32_t>(IrOpcode::kI##format##ShrS, Operator::kPure,        \
    1274             :                            "Arithmetic shift right", 1, 0, 0, 1, 0, 0, shift); \
    1275             :   }                                                                            \
    1276             :   const Operator* MachineOperatorBuilder::I##format##ShrU(int32_t shift) {     \
    1277             :     DCHECK(0 <= shift && shift < bits);                                        \
    1278             :     return new (zone_)                                                         \
    1279             :         Operator1<int32_t>(IrOpcode::kI##format##ShrU, Operator::kPure,        \
    1280             :                            "Shift right", 1, 0, 0, 1, 0, 0, shift);            \
    1281             :   }
    1282        2544 : SIMD_FORMAT_LIST(SIMD_SHIFT_OPS)
    1283             : #undef SIMD_SHIFT_OPS
    1284             : 
    1285       15168 : const Operator* MachineOperatorBuilder::S8x16Shuffle(
    1286             :     const uint8_t shuffle[16]) {
    1287       15168 :   uint8_t* array = zone_->NewArray<uint8_t>(16);
    1288             :   memcpy(array, shuffle, 16);
    1289             :   return new (zone_)
    1290             :       Operator1<uint8_t*>(IrOpcode::kS8x16Shuffle, Operator::kPure, "Shuffle",
    1291       30336 :                           2, 0, 0, 1, 0, 0, array);
    1292             : }
    1293             : 
    1294             : #undef PURE_BINARY_OP_LIST_32
    1295             : #undef PURE_BINARY_OP_LIST_64
    1296             : #undef MACHINE_PURE_OP_LIST
    1297             : #undef PURE_OPTIONAL_OP_LIST
    1298             : #undef OVERFLOW_OP_LIST
    1299             : #undef MACHINE_TYPE_LIST
    1300             : #undef MACHINE_REPRESENTATION_LIST
    1301             : #undef ATOMIC_TYPE_LIST
    1302             : #undef ATOMIC_U64_TYPE_LIST
    1303             : #undef ATOMIC_U32_TYPE_LIST
    1304             : #undef ATOMIC_REPRESENTATION_LIST
    1305             : #undef ATOMIC64_REPRESENTATION_LIST
    1306             : #undef SIMD_LANE_OP_LIST
    1307             : #undef SIMD_FORMAT_LIST
    1308             : #undef STACK_SLOT_CACHED_SIZES_ALIGNMENTS_LIST
    1309             : 
    1310             : }  // namespace compiler
    1311             : }  // namespace internal
    1312             : }  // namespace v8

Generated by: LCOV version 1.10