Bug 1146311: Make some SIMD nodes cloneable and movable; r=sunfish
authorBenjamin Bouvier <benj@benj.me>
Mon, 23 Mar 2015 13:41:10 +0100
changeset 266420 2713e4e8e549474c06b6645fc0722ec1fd72c5b4
parent 266419 366c8ef076488ed6fe2f158d4a65d47bb7013153
child 266421 49aa36d0b28abd98101719a75e6b70c0daf4782f
push id830
push userraliiev@mozilla.com
push dateFri, 19 Jun 2015 19:24:37 +0000
treeherdermozilla-release@932614382a68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssunfish
bugs1146311
milestone39.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 1146311: Make some SIMD nodes cloneable and movable; r=sunfish
js/src/jit/MIR.h
--- a/js/src/jit/MIR.h
+++ b/js/src/jit/MIR.h
@@ -1486,18 +1486,18 @@ class MSimdSplatX4
 class MSimdConstant
   : public MNullaryInstruction
 {
     SimdConstant value_;
 
   protected:
     MSimdConstant(const SimdConstant &v, MIRType type) : value_(v) {
         MOZ_ASSERT(IsSimdType(type));
+        setMovable();
         setResultType(type);
-        setMovable();
     }
 
   public:
     INSTRUCTION_HEADER(SimdConstant)
     static MSimdConstant *New(TempAllocator &alloc, const SimdConstant &v, MIRType type) {
         return new(alloc) MSimdConstant(v, type);
     }
 
@@ -1522,16 +1522,17 @@ class MSimdConstant
 class MSimdConvert
   : public MUnaryInstruction,
     public SimdPolicy<0>::Data
 {
     MSimdConvert(MDefinition *obj, MIRType fromType, MIRType toType)
       : MUnaryInstruction(obj)
     {
         MOZ_ASSERT(IsSimdType(toType));
+        setMovable();
         setResultType(toType);
         specialization_ = fromType; // expects fromType as input
     }
 
   public:
     INSTRUCTION_HEADER(SimdConvert)
     static MSimdConvert *NewAsmJS(TempAllocator &alloc, MDefinition *obj, MIRType fromType,
                                   MIRType toType)
@@ -1559,16 +1560,17 @@ class MSimdConvert
 class MSimdReinterpretCast
   : public MUnaryInstruction,
     public SimdPolicy<0>::Data
 {
     MSimdReinterpretCast(MDefinition *obj, MIRType fromType, MIRType toType)
       : MUnaryInstruction(obj)
     {
         MOZ_ASSERT(IsSimdType(toType));
+        setMovable();
         setResultType(toType);
         specialization_ = fromType; // expects fromType as input
     }
 
   public:
     INSTRUCTION_HEADER(SimdReinterpretCast)
     static MSimdReinterpretCast* NewAsmJS(TempAllocator &alloc, MDefinition *obj, MIRType fromType,
                                           MIRType toType)
@@ -1603,16 +1605,17 @@ class MSimdExtractElement
     MSimdExtractElement(MDefinition *obj, MIRType vecType, MIRType scalarType, SimdLane lane)
       : MUnaryInstruction(obj), lane_(lane)
     {
         MOZ_ASSERT(IsSimdType(vecType));
         MOZ_ASSERT(uint32_t(lane) < SimdTypeToLength(vecType));
         MOZ_ASSERT(!IsSimdType(scalarType));
         MOZ_ASSERT(SimdTypeToScalarType(vecType) == scalarType);
 
+        setMovable();
         specialization_ = vecType;
         setResultType(scalarType);
     }
 
   public:
     INSTRUCTION_HEADER(SimdExtractElement)
 
     static MSimdExtractElement *NewAsmJS(TempAllocator &alloc, MDefinition *obj, MIRType type,