Bug 1072927: Make SIMD MIR nodes cloneables; r=bhackett
authorBenjamin Bouvier <benj@benj.me>
Mon, 29 Sep 2014 16:54:21 +0200
changeset 207711 8a785a0ba4993ea5a56a6f2d36d0d9389fa01400
parent 207710 be1ba92ccc0028047a55e44cd04fd4e585b75d06
child 207712 50220dbf59ed0e5d2acaa4345f677fc2d80b60cf
push id27564
push userryanvm@gmail.com
push dateMon, 29 Sep 2014 18:57:04 +0000
treeherdermozilla-central@ce9a0b34225e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbhackett
bugs1072927
milestone35.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1072927: Make SIMD MIR nodes cloneables; r=bhackett
js/src/jit/MIR.h
--- a/js/src/jit/MIR.h
+++ b/js/src/jit/MIR.h
@@ -1290,16 +1290,18 @@ class MSimdValueX4 : public MQuaternaryI
         return AliasSet::None();
     }
 
     bool congruentTo(const MDefinition *ins) const {
         return congruentIfOperandsEqual(ins);
     }
 
     MDefinition *foldsTo(TempAllocator &alloc);
+
+    ALLOW_CLONE(MSimdValueX4)
 };
 
 // Generic constructor of SIMD valuesX4.
 class MSimdSplatX4 : public MUnaryInstruction
 {
   protected:
     MSimdSplatX4(MIRType type, MDefinition *v)
       : MUnaryInstruction(v)
@@ -1324,16 +1326,18 @@ class MSimdSplatX4 : public MUnaryInstru
         return AliasSet::None();
     }
 
     bool congruentTo(const MDefinition *ins) const {
         return congruentIfOperandsEqual(ins);
     }
 
     MDefinition *foldsTo(TempAllocator &alloc);
+
+    ALLOW_CLONE(MSimdSplatX4)
 };
 
 // A constant SIMD value.
 class MSimdConstant : public MNullaryInstruction
 {
     SimdConstant value_;
 
   protected:
@@ -1357,16 +1361,18 @@ class MSimdConstant : public MNullaryIns
 
     const SimdConstant &value() const {
         return value_;
     }
 
     AliasSet getAliasSet() const {
         return AliasSet::None();
     }
+
+    ALLOW_CLONE(MSimdConstant)
 };
 
 // Converts all lanes of a given vector into the type of another vector
 class MSimdConvert : public MUnaryInstruction
 {
     MSimdConvert(MDefinition *obj, MIRType fromType, MIRType toType)
       : MUnaryInstruction(obj)
     {
@@ -1454,16 +1460,17 @@ class MSimdExtractElement : public MUnar
     bool congruentTo(const MDefinition *ins) const {
         if (!ins->isSimdExtractElement())
             return false;
         const MSimdExtractElement *other = ins->toSimdExtractElement();
         if (other->lane_ != lane_)
             return false;
         return congruentIfOperandsEqual(other);
     }
+    ALLOW_CLONE(MSimdExtractElement)
 };
 
 // Replaces the datum in the given lane by a scalar value of the same type.
 class MSimdInsertElement : public MBinaryInstruction
 {
   private:
     SimdLane lane_;
 
@@ -1498,16 +1505,18 @@ class MSimdInsertElement : public MBinar
 
     AliasSet getAliasSet() const {
         return AliasSet::None();
     }
 
     bool congruentTo(const MDefinition *ins) const {
         return binaryCongruentTo(ins) && lane_ == ins->toSimdInsertElement()->lane();
     }
+
+    ALLOW_CLONE(MSimdInsertElement)
 };
 
 // Extracts the sign bits from a given vector, returning an MIRType_Int32.
 class MSimdSignMask : public MUnaryInstruction
 {
   protected:
     explicit MSimdSignMask(MDefinition *obj)
       : MUnaryInstruction(obj)
@@ -1527,16 +1536,18 @@ class MSimdSignMask : public MUnaryInstr
     AliasSet getAliasSet() const {
         return AliasSet::None();
     }
     bool congruentTo(const MDefinition *ins) const {
         if (!ins->isSimdSignMask())
             return false;
         return congruentIfOperandsEqual(ins);
     }
+
+    ALLOW_CLONE(MSimdSignMask)
 };
 
 // Compares each value of a SIMD vector to each corresponding lane's value of
 // another SIMD vector, and returns a int32x4 vector containing the results of
 // the comparison: all bits are set to 1 if the comparison is true, 0 otherwise.
 class MSimdBinaryComp : public MBinaryInstruction
 {
   public:
@@ -1592,16 +1603,18 @@ class MSimdBinaryComp : public MBinaryIn
     Operation operation() const { return operation_; }
     CompareType compareType() const { return compareType_; }
 
     bool congruentTo(const MDefinition *ins) const {
         if (!binaryCongruentTo(ins))
             return false;
         return operation_ == ins->toSimdBinaryComp()->operation();
     }
+
+    ALLOW_CLONE(MSimdBinaryComp)
 };
 
 class MSimdBinaryArith : public MBinaryInstruction
 {
   public:
     enum Operation {
         Add,
         Sub,
@@ -1653,16 +1666,18 @@ class MSimdBinaryArith : public MBinaryI
 
     Operation operation() const { return operation_; }
 
     bool congruentTo(const MDefinition *ins) const {
         if (!binaryCongruentTo(ins))
             return false;
         return operation_ == ins->toSimdBinaryArith()->operation();
     }
+
+    ALLOW_CLONE(MSimdBinaryArith)
 };
 
 class MSimdBinaryBitwise : public MBinaryInstruction
 {
   public:
     enum Operation {
         and_,
         or_,
@@ -1697,16 +1712,18 @@ class MSimdBinaryBitwise : public MBinar
 
     Operation operation() const { return operation_; }
 
     bool congruentTo(const MDefinition *ins) const {
         if (!binaryCongruentTo(ins))
             return false;
         return operation_ == ins->toSimdBinaryBitwise()->operation();
     }
+
+    ALLOW_CLONE(MSimdBinaryBitwise)
 };
 
 class MSimdTernaryBitwise : public MTernaryInstruction
 {
   public:
     enum Operation {
         select
     };
@@ -1733,16 +1750,18 @@ class MSimdTernaryBitwise : public MTern
         return new(alloc) MSimdTernaryBitwise(mask, lhs, rhs, op, t);
     }
 
     AliasSet getAliasSet() const {
         return AliasSet::None();
     }
 
     Operation operation() const { return operation_; }
+
+    ALLOW_CLONE(MSimdTernaryBitwise)
 };
 
 // Deep clone a constant JSObject.
 class MCloneLiteral
   : public MUnaryInstruction,
     public ObjectPolicy<0>::Data
 {
   protected: