LCOV - code coverage report
Current view: top level - src/compiler - machine-operator.cc (source / functions) Hit Total Coverage
Test: app.info Lines: 156 228 68.4 %
Date: 2019-01-20 Functions: 790 1826 43.3 %

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

Generated by: LCOV version 1.10