Bug 1136226 - Rename MSimdSplatX4 to MSimdSplat. r=bbouvier
authorJakob Olesen <jolesen@mozilla.com>
Mon, 09 May 2016 16:48:31 -0700
changeset 296724 a8a0b4464969d0b76cb23556e6bc940d74e481db
parent 296723 117800523a0368e2a98d90befbc9c15854c7ce6c
child 296725 f4b3c6c334e9bacbd278dfb4cd5aeee59098ef9d
push id30245
push usercbook@mozilla.com
push dateTue, 10 May 2016 10:06:29 +0000
treeherdermozilla-central@1579b9e2e50f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbbouvier
bugs1136226
milestone49.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 1136226 - Rename MSimdSplatX4 to MSimdSplat. r=bbouvier This MIR instruction will be used for splatting all vector shapes.
js/src/asmjs/WasmIonCompile.cpp
js/src/jit/MCallOptimize.cpp
js/src/jit/MIR.cpp
js/src/jit/MIR.h
js/src/jit/MOpcodes.h
js/src/jit/arm/Lowering-arm.cpp
js/src/jit/arm/Lowering-arm.h
js/src/jit/arm64/Lowering-arm64.cpp
js/src/jit/arm64/Lowering-arm64.h
js/src/jit/mips-shared/Lowering-mips-shared.cpp
js/src/jit/mips-shared/Lowering-mips-shared.h
js/src/jit/none/Lowering-none.h
js/src/jit/shared/LIR-shared.h
js/src/jit/x86-shared/CodeGenerator-x86-shared.cpp
js/src/jit/x86-shared/Lowering-x86-shared.cpp
js/src/jit/x86-shared/Lowering-x86-shared.h
--- a/js/src/asmjs/WasmIonCompile.cpp
+++ b/js/src/asmjs/WasmIonCompile.cpp
@@ -433,17 +433,17 @@ class FunctionCompiler
 
     MDefinition* splatSimd(MDefinition* v, MIRType type)
     {
         if (inDeadCode())
             return nullptr;
 
         MOZ_ASSERT(IsSimdType(type));
         MOZ_ASSERT(SimdTypeToLaneArgumentType(type) == v->type());
-        MSimdSplatX4* ins = MSimdSplatX4::New(alloc(), v, type);
+        MSimdSplat* ins = MSimdSplat::New(alloc(), v, type);
         curBlock_->add(ins);
         return ins;
     }
 
     MDefinition* minMax(MDefinition* lhs, MDefinition* rhs, MIRType type, bool isMax) {
         if (inDeadCode())
             return nullptr;
         MMinMax* ins = MMinMax::New(alloc(), lhs, rhs, type, isMax);
--- a/js/src/jit/MCallOptimize.cpp
+++ b/js/src/jit/MCallOptimize.cpp
@@ -3609,17 +3609,17 @@ IonBuilder::inlineSimdSplat(CallInfo& ca
 
     MIRType mirType = SimdTypeToMIRType(type);
     MDefinition* arg = callInfo.getArg(0);
 
     // Convert to 0 / -1 before splatting a boolean lane.
     if (SimdTypeToLaneType(mirType) == MIRType::Boolean)
         arg = convertToBooleanSimdLane(arg);
 
-    MSimdSplatX4* ins = MSimdSplatX4::New(alloc(), arg, mirType);
+    MSimdSplat* ins = MSimdSplat::New(alloc(), arg, mirType);
     return boxSimd(callInfo, ins, templateObj);
 }
 
 IonBuilder::InliningStatus
 IonBuilder::inlineSimdExtractLane(CallInfo& callInfo, JSNative native, SimdType type)
 {
     // extractLane() returns a scalar, so don't use canInlineSimd() which looks
     // for a template object.
--- a/js/src/jit/MIR.cpp
+++ b/js/src/jit/MIR.cpp
@@ -1118,21 +1118,21 @@ MSimdValueX4::foldsTo(TempAllocator& all
           }
           default: MOZ_CRASH("unexpected type in MSimdValueX4::foldsTo");
         }
 
         return MSimdConstant::New(alloc, cst, type());
     }
 
     MOZ_ASSERT(allSame);
-    return MSimdSplatX4::New(alloc, getOperand(0), type());
+    return MSimdSplat::New(alloc, getOperand(0), type());
 }
 
 MDefinition*
-MSimdSplatX4::foldsTo(TempAllocator& alloc)
+MSimdSplat::foldsTo(TempAllocator& alloc)
 {
 #ifdef DEBUG
     MIRType laneType = SimdTypeToLaneArgumentType(type());
 #endif
     MDefinition* op = getOperand(0);
     if (!op->isConstant())
         return this;
     MOZ_ASSERT(op->type() == laneType);
@@ -1149,17 +1149,17 @@ MSimdSplatX4::foldsTo(TempAllocator& all
         cst = SimdConstant::SplatX4(v);
         break;
       }
       case MIRType::Float32x4: {
         float v = op->toConstant()->numberToDouble();
         cst = SimdConstant::SplatX4(v);
         break;
       }
-      default: MOZ_CRASH("unexpected type in MSimdSplatX4::foldsTo");
+      default: MOZ_CRASH("unexpected type in MSimdSplat::foldsTo");
     }
 
     return MSimdConstant::New(alloc, cst, type());
 }
 
 MDefinition*
 MSimdUnbox::foldsTo(TempAllocator& alloc)
 {
--- a/js/src/jit/MIR.h
+++ b/js/src/jit/MIR.h
@@ -1590,53 +1590,53 @@ class MSimdValueX4
         return congruentIfOperandsEqual(ins);
     }
 
     MDefinition* foldsTo(TempAllocator& alloc) override;
 
     ALLOW_CLONE(MSimdValueX4)
 };
 
-// Generic constructor of SIMD valuesX4.
-class MSimdSplatX4
+// Generic constructor of SIMD values with identical lanes.
+class MSimdSplat
   : public MUnaryInstruction,
     public SimdScalarPolicy<0>::Data
 {
   protected:
-    MSimdSplatX4(MIRType type, MDefinition* v)
+    MSimdSplat(MIRType type, MDefinition* v)
       : MUnaryInstruction(v)
     {
         MOZ_ASSERT(IsSimdType(type));
         setMovable();
         setResultType(type);
     }
 
   public:
-    INSTRUCTION_HEADER(SimdSplatX4)
-
-    static MSimdSplatX4* New(TempAllocator& alloc, MDefinition* v, MIRType type)
-    {
-        return new(alloc) MSimdSplatX4(type, v);
+    INSTRUCTION_HEADER(SimdSplat)
+
+    static MSimdSplat* New(TempAllocator& alloc, MDefinition* v, MIRType type)
+    {
+        return new(alloc) MSimdSplat(type, v);
     }
 
     bool canConsumeFloat32(MUse* use) const override {
         return SimdTypeToLaneType(type()) == MIRType::Float32;
     }
 
     AliasSet getAliasSet() const override {
         return AliasSet::None();
     }
 
     bool congruentTo(const MDefinition* ins) const override {
         return congruentIfOperandsEqual(ins);
     }
 
     MDefinition* foldsTo(TempAllocator& alloc) override;
 
-    ALLOW_CLONE(MSimdSplatX4)
+    ALLOW_CLONE(MSimdSplat)
 };
 
 // A constant SIMD value.
 class MSimdConstant
   : public MNullaryInstruction
 {
     SimdConstant value_;
 
--- a/js/src/jit/MOpcodes.h
+++ b/js/src/jit/MOpcodes.h
@@ -10,17 +10,17 @@
 namespace js {
 namespace jit {
 
 #define MIR_OPCODE_LIST(_)                                                  \
     _(Constant)                                                             \
     _(SimdBox)                                                              \
     _(SimdUnbox)                                                            \
     _(SimdValueX4)                                                          \
-    _(SimdSplatX4)                                                          \
+    _(SimdSplat)                                                            \
     _(SimdConstant)                                                         \
     _(SimdConvert)                                                          \
     _(SimdReinterpretCast)                                                  \
     _(SimdExtractElement)                                                   \
     _(SimdInsertElement)                                                    \
     _(SimdSwizzle)                                                          \
     _(SimdGeneralShuffle)                                                   \
     _(SimdShuffle)                                                          \
--- a/js/src/jit/arm/Lowering-arm.cpp
+++ b/js/src/jit/arm/Lowering-arm.cpp
@@ -574,17 +574,17 @@ LIRGeneratorARM::visitSimdBinaryArith(MS
 
 void
 LIRGeneratorARM::visitSimdSelect(MSimdSelect* ins)
 {
     MOZ_CRASH("NYI");
 }
 
 void
-LIRGeneratorARM::visitSimdSplatX4(MSimdSplatX4* ins)
+LIRGeneratorARM::visitSimdSplat(MSimdSplat* ins)
 {
     MOZ_CRASH("NYI");
 }
 
 void
 LIRGeneratorARM::visitSimdValueX4(MSimdValueX4* ins)
 {
     MOZ_CRASH("NYI");
--- a/js/src/jit/arm/Lowering-arm.h
+++ b/js/src/jit/arm/Lowering-arm.h
@@ -101,17 +101,17 @@ class LIRGeneratorARM : public LIRGenera
     void visitAsmJSStoreHeap(MAsmJSStoreHeap* ins);
     void visitAsmJSLoadFuncPtr(MAsmJSLoadFuncPtr* ins);
     void visitAsmJSCompareExchangeHeap(MAsmJSCompareExchangeHeap* ins);
     void visitAsmJSAtomicExchangeHeap(MAsmJSAtomicExchangeHeap* ins);
     void visitAsmJSAtomicBinopHeap(MAsmJSAtomicBinopHeap* ins);
     void visitStoreTypedArrayElementStatic(MStoreTypedArrayElementStatic* ins);
     void visitSimdBinaryArith(MSimdBinaryArith* ins);
     void visitSimdSelect(MSimdSelect* ins);
-    void visitSimdSplatX4(MSimdSplatX4* ins);
+    void visitSimdSplat(MSimdSplat* ins);
     void visitSimdValueX4(MSimdValueX4* ins);
     void visitCompareExchangeTypedArrayElement(MCompareExchangeTypedArrayElement* ins);
     void visitAtomicExchangeTypedArrayElement(MAtomicExchangeTypedArrayElement* ins);
     void visitAtomicTypedArrayElementBinop(MAtomicTypedArrayElementBinop* ins);
     void visitSubstr(MSubstr* ins);
     void visitRandom(MRandom* ins);
     void visitWasmTruncateToInt64(MWasmTruncateToInt64* ins);
     void visitInt64ToFloatingPoint(MInt64ToFloatingPoint* ins);
--- a/js/src/jit/arm64/Lowering-arm64.cpp
+++ b/js/src/jit/arm64/Lowering-arm64.cpp
@@ -293,17 +293,17 @@ LIRGeneratorARM64::visitSimdBinaryArith(
 
 void
 LIRGeneratorARM64::visitSimdSelect(MSimdSelect* ins)
 {
     MOZ_CRASH("NYI");
 }
 
 void
-LIRGeneratorARM64::visitSimdSplatX4(MSimdSplatX4* ins)
+LIRGeneratorARM64::visitSimdSplat(MSimdSplat* ins)
 {
     MOZ_CRASH("NYI");
 }
 
 void
 LIRGeneratorARM64::visitSimdValueX4(MSimdValueX4* ins)
 {
     MOZ_CRASH("NYI");
--- a/js/src/jit/arm64/Lowering-arm64.h
+++ b/js/src/jit/arm64/Lowering-arm64.h
@@ -104,17 +104,17 @@ class LIRGeneratorARM64 : public LIRGene
     void visitAsmJSStoreHeap(MAsmJSStoreHeap* ins);
     void visitAsmJSLoadFuncPtr(MAsmJSLoadFuncPtr* ins);
     void visitAsmJSCompareExchangeHeap(MAsmJSCompareExchangeHeap* ins);
     void visitAsmJSAtomicExchangeHeap(MAsmJSAtomicExchangeHeap* ins);
     void visitAsmJSAtomicBinopHeap(MAsmJSAtomicBinopHeap* ins);
     void visitStoreTypedArrayElementStatic(MStoreTypedArrayElementStatic* ins);
     void visitSimdBinaryArith(MSimdBinaryArith* ins);
     void visitSimdSelect(MSimdSelect* ins);
-    void visitSimdSplatX4(MSimdSplatX4* ins);
+    void visitSimdSplat(MSimdSplat* ins);
     void visitSimdValueX4(MSimdValueX4* ins);
     void visitCompareExchangeTypedArrayElement(MCompareExchangeTypedArrayElement* ins);
     void visitAtomicExchangeTypedArrayElement(MAtomicExchangeTypedArrayElement* ins);
     void visitAtomicTypedArrayElementBinop(MAtomicTypedArrayElementBinop* ins);
     void visitSubstr(MSubstr* ins);
     void visitRandom(MRandom* ins);
     void visitWasmTruncateToInt64(MWasmTruncateToInt64* ins);
     void visitInt64ToFloatingPoint(MInt64ToFloatingPoint* ins);
--- a/js/src/jit/mips-shared/Lowering-mips-shared.cpp
+++ b/js/src/jit/mips-shared/Lowering-mips-shared.cpp
@@ -412,17 +412,17 @@ LIRGeneratorMIPSShared::visitSimdBinaryA
 
 void
 LIRGeneratorMIPSShared::visitSimdSelect(MSimdSelect* ins)
 {
     MOZ_CRASH("NYI");
 }
 
 void
-LIRGeneratorMIPSShared::visitSimdSplatX4(MSimdSplatX4* ins)
+LIRGeneratorMIPSShared::visitSimdSplat(MSimdSplat* ins)
 {
     MOZ_CRASH("NYI");
 }
 
 void
 LIRGeneratorMIPSShared::visitSimdValueX4(MSimdValueX4* ins)
 {
     MOZ_CRASH("NYI");
--- a/js/src/jit/mips-shared/Lowering-mips-shared.h
+++ b/js/src/jit/mips-shared/Lowering-mips-shared.h
@@ -86,17 +86,17 @@ class LIRGeneratorMIPSShared : public LI
     void visitAsmJSStoreHeap(MAsmJSStoreHeap* ins);
     void visitAsmJSCompareExchangeHeap(MAsmJSCompareExchangeHeap* ins);
     void visitAsmJSAtomicExchangeHeap(MAsmJSAtomicExchangeHeap* ins);
     void visitAsmJSAtomicBinopHeap(MAsmJSAtomicBinopHeap* ins);
     void visitAsmJSLoadFuncPtr(MAsmJSLoadFuncPtr* ins);
     void visitStoreTypedArrayElementStatic(MStoreTypedArrayElementStatic* ins);
     void visitSimdBinaryArith(MSimdBinaryArith* ins);
     void visitSimdSelect(MSimdSelect* ins);
-    void visitSimdSplatX4(MSimdSplatX4* ins);
+    void visitSimdSplat(MSimdSplat* ins);
     void visitSimdValueX4(MSimdValueX4* ins);
     void visitCompareExchangeTypedArrayElement(MCompareExchangeTypedArrayElement* ins);
     void visitAtomicExchangeTypedArrayElement(MAtomicExchangeTypedArrayElement* ins);
     void visitAtomicTypedArrayElementBinop(MAtomicTypedArrayElementBinop* ins);
     void visitSubstr(MSubstr* ins);
     void visitWasmTruncateToInt64(MWasmTruncateToInt64* ins);
     void visitInt64ToFloatingPoint(MInt64ToFloatingPoint* ins);
 };
--- a/js/src/jit/none/Lowering-none.h
+++ b/js/src/jit/none/Lowering-none.h
@@ -85,17 +85,17 @@ class LIRGeneratorNone : public LIRGener
     void visitAsmJSCompareExchangeHeap(MAsmJSCompareExchangeHeap* ins) { MOZ_CRASH(); }
     void visitAsmJSAtomicExchangeHeap(MAsmJSAtomicExchangeHeap* ins) { MOZ_CRASH(); }
     void visitAsmJSAtomicBinopHeap(MAsmJSAtomicBinopHeap* ins) { MOZ_CRASH(); }
     void visitAsmSelect(MAsmSelect*) { MOZ_CRASH(); }
 
     LTableSwitch* newLTableSwitch(LAllocation, LDefinition, MTableSwitch*) { MOZ_CRASH(); }
     LTableSwitchV* newLTableSwitchV(MTableSwitch*) { MOZ_CRASH(); }
     void visitSimdSelect(MSimdSelect* ins) { MOZ_CRASH(); }
-    void visitSimdSplatX4(MSimdSplatX4* ins) { MOZ_CRASH(); }
+    void visitSimdSplat(MSimdSplat* ins) { MOZ_CRASH(); }
     void visitSimdValueX4(MSimdValueX4* lir) { MOZ_CRASH(); }
     void visitSubstr(MSubstr*) { MOZ_CRASH(); }
     void visitSimdBinaryArith(js::jit::MSimdBinaryArith*) { MOZ_CRASH(); }
     void visitRandom(js::jit::MRandom*) { MOZ_CRASH(); }
     void visitWasmTruncateToInt64(MWasmTruncateToInt64*) { MOZ_CRASH(); }
     void visitInt64ToFloatingPoint(MInt64ToFloatingPoint*) { MOZ_CRASH(); }
 };
 
--- a/js/src/jit/shared/LIR-shared.h
+++ b/js/src/jit/shared/LIR-shared.h
@@ -200,18 +200,18 @@ class LSimdSplatX4 : public LInstruction
 {
   public:
     LIR_HEADER(SimdSplatX4)
     explicit LSimdSplatX4(const LAllocation& v)
     {
         setOperand(0, v);
     }
 
-    MSimdSplatX4* mir() const {
-        return mir_->toSimdSplatX4();
+    MSimdSplat* mir() const {
+        return mir_->toSimdSplat();
     }
 };
 
 // Reinterpret the bits of a SIMD value with a different type.
 class LSimdReinterpretCast : public LInstructionHelper<1, 1, 0>
 {
   public:
     LIR_HEADER(SimdReinterpretCast)
--- a/js/src/jit/x86-shared/CodeGenerator-x86-shared.cpp
+++ b/js/src/jit/x86-shared/CodeGenerator-x86-shared.cpp
@@ -2626,17 +2626,17 @@ CodeGeneratorX86Shared::visitSimdValueFl
     masm.vunpcklps(tmp, output, output);
 }
 
 void
 CodeGeneratorX86Shared::visitSimdSplatX4(LSimdSplatX4* ins)
 {
     FloatRegister output = ToFloatRegister(ins->output());
 
-    MSimdSplatX4* mir = ins->mir();
+    MSimdSplat* mir = ins->mir();
     MOZ_ASSERT(IsSimdType(mir->type()));
     JS_STATIC_ASSERT(sizeof(float) == sizeof(int32_t));
 
     switch (mir->type()) {
       case MIRType::Int32x4:
       case MIRType::Bool32x4: {
         Register r = ToRegister(ins->getOperand(0));
         masm.vmovd(r, output);
--- a/js/src/jit/x86-shared/Lowering-x86-shared.cpp
+++ b/js/src/jit/x86-shared/Lowering-x86-shared.cpp
@@ -683,17 +683,17 @@ LIRGeneratorX86Shared::visitSimdSelect(M
     lins->setOperand(1, useRegister(r1));
     lins->setOperand(2, useRegister(r2));
     lins->setTemp(0, temp(LDefinition::SIMD128FLOAT));
 
     define(lins, ins);
 }
 
 void
-LIRGeneratorX86Shared::visitSimdSplatX4(MSimdSplatX4* ins)
+LIRGeneratorX86Shared::visitSimdSplat(MSimdSplat* ins)
 {
     LAllocation x = useRegisterAtStart(ins->getOperand(0));
     LSimdSplatX4* lir = new(alloc()) LSimdSplatX4(x);
 
     switch (ins->type()) {
       case MIRType::Int32x4:
       case MIRType::Bool32x4:
         define(lir, ins);
--- a/js/src/jit/x86-shared/Lowering-x86-shared.h
+++ b/js/src/jit/x86-shared/Lowering-x86-shared.h
@@ -53,17 +53,17 @@ class LIRGeneratorX86Shared : public LIR
     void lowerModI(MMod* mod);
     void lowerUDiv(MDiv* div);
     void lowerUMod(MMod* mod);
     void lowerUrshD(MUrsh* mir);
     void lowerTruncateDToInt32(MTruncateToInt32* ins);
     void lowerTruncateFToInt32(MTruncateToInt32* ins);
     void visitSimdBinaryArith(MSimdBinaryArith* ins);
     void visitSimdSelect(MSimdSelect* ins);
-    void visitSimdSplatX4(MSimdSplatX4* ins);
+    void visitSimdSplat(MSimdSplat* ins);
     void visitSimdValueX4(MSimdValueX4* ins);
     void lowerCompareExchangeTypedArrayElement(MCompareExchangeTypedArrayElement* ins,
                                                bool useI386ByteRegisters);
     void lowerAtomicExchangeTypedArrayElement(MAtomicExchangeTypedArrayElement* ins,
                                               bool useI386ByteRegisters);
     void lowerAtomicTypedArrayElementBinop(MAtomicTypedArrayElementBinop* ins,
                                            bool useI386ByteRegisters);
 };