Bug 1148232 - IonMonkey: Delete unused code r=luke
authorDan Gohman <sunfish@mozilla.com>
Fri, 27 Mar 2015 10:15:21 -0700
changeset 265100 982ae8f096bdaaad83381750b88c9438c8e55f07
parent 265099 d2abf02e8df8e4bd1c444b8b61337bd97f186dbf
child 265101 46872ab971799fe92a3a8297228bb3d6ad7bbc34
push id4718
push userraliiev@mozilla.com
push dateMon, 11 May 2015 18:39:53 +0000
treeherdermozilla-beta@c20c4ef55f08 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluke
bugs1148232
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 1148232 - IonMonkey: Delete unused code r=luke
js/src/asmjs/AsmJSValidate.cpp
js/src/jit/shared/CodeGenerator-shared.cpp
js/src/jit/shared/CodeGenerator-shared.h
--- a/js/src/asmjs/AsmJSValidate.cpp
+++ b/js/src/asmjs/AsmJSValidate.cpp
@@ -5765,17 +5765,17 @@ CheckSimdShuffle(FunctionCompiler &f, Pa
     *def = f.shuffleSimd(vecs[0], vecs[1], lanes[0], lanes[1], lanes[2], lanes[3],
                          retType.toMIRType());
     *type = retType;
     return true;
 }
 
 static bool
 CheckSimdLoadStoreArgs(FunctionCompiler &f, ParseNode *call, AsmJSSimdType opType,
-                       unsigned numElems, Scalar::Type *viewType, MDefinition **index,
+                       Scalar::Type *viewType, MDefinition **index,
                        NeedsBoundsCheck *needsBoundsCheck)
 {
     ParseNode *view = CallArgList(call);
     if (!view->isKind(PNK_NAME))
         return f.fail(view, "expected Uint8Array view as SIMD.*.load/store first argument");
 
     const ModuleCompiler::Global *global = f.lookupGlobal(view->name());
     if (!global ||
@@ -5828,17 +5828,17 @@ CheckSimdLoad(FunctionCompiler &f, Parse
 {
     unsigned numArgs = CallArgListLength(call);
     if (numArgs != 2)
         return f.failf(call, "expected 2 arguments to SIMD load, got %u", numArgs);
 
     Scalar::Type viewType;
     MDefinition *index;
     NeedsBoundsCheck needsBoundsCheck;
-    if (!CheckSimdLoadStoreArgs(f, call, opType, numElems, &viewType, &index, &needsBoundsCheck))
+    if (!CheckSimdLoadStoreArgs(f, call, opType, &viewType, &index, &needsBoundsCheck))
         return false;
 
     PrepareArrayIndex(f, &index, needsBoundsCheck, NoMask);
 
     *def = f.loadSimdHeap(viewType, index, needsBoundsCheck, numElems);
     *type = opType;
     return true;
 }
@@ -5849,17 +5849,17 @@ CheckSimdStore(FunctionCompiler &f, Pars
 {
     unsigned numArgs = CallArgListLength(call);
     if (numArgs != 3)
         return f.failf(call, "expected 3 arguments to SIMD store, got %u", numArgs);
 
     Scalar::Type viewType;
     MDefinition *index;
     NeedsBoundsCheck needsBoundsCheck;
-    if (!CheckSimdLoadStoreArgs(f, call, opType, numElems, &viewType, &index, &needsBoundsCheck))
+    if (!CheckSimdLoadStoreArgs(f, call, opType, &viewType, &index, &needsBoundsCheck))
         return false;
 
     Type retType = opType;
     ParseNode *vecExpr = NextNode(NextNode(CallArgList(call)));
     MDefinition *vec;
     Type vecType;
     if (!CheckExpr(f, vecExpr, &vec, &vecType))
         return false;
--- a/js/src/jit/shared/CodeGenerator-shared.cpp
+++ b/js/src/jit/shared/CodeGenerator-shared.cpp
@@ -35,18 +35,17 @@ CodeGeneratorShared::ensureMasm(MacroAss
 {
     if (masmArg)
         return *masmArg;
     maybeMasm_.emplace();
     return *maybeMasm_;
 }
 
 CodeGeneratorShared::CodeGeneratorShared(MIRGenerator *gen, LIRGraph *graph, MacroAssembler *masmArg)
-  : oolIns(nullptr),
-    maybeMasm_(),
+  : maybeMasm_(),
     masm(ensureMasm(masmArg)),
     gen(gen),
     graph(*graph),
     current(nullptr),
     snapshots_(),
     recovers_(),
     deoptTable_(nullptr),
 #ifdef DEBUG
@@ -124,20 +123,18 @@ CodeGeneratorShared::generateOutOfLineCo
             return false;
 
         JitSpew(JitSpew_Codegen, "# Emitting out of line code");
 
         masm.setFramePushed(outOfLineCode_[i]->framePushed());
         lastPC_ = outOfLineCode_[i]->pc();
         outOfLineCode_[i]->bind(&masm);
 
-        oolIns = outOfLineCode_[i];
         outOfLineCode_[i]->generate(this);
     }
-    oolIns = nullptr;
 
     return true;
 }
 
 void
 CodeGeneratorShared::addOutOfLineCode(OutOfLineCode *code, const MInstruction *mir)
 {
     MOZ_ASSERT(mir);
--- a/js/src/jit/shared/CodeGenerator-shared.h
+++ b/js/src/jit/shared/CodeGenerator-shared.h
@@ -57,17 +57,16 @@ struct NativeToTrackedOptimizations
     CodeOffsetLabel startOffset;
     CodeOffsetLabel endOffset;
     const TrackedOptimizations *optimizations;
 };
 
 class CodeGeneratorShared : public LElementVisitor
 {
     js::Vector<OutOfLineCode *, 0, SystemAllocPolicy> outOfLineCode_;
-    OutOfLineCode *oolIns;
 
     MacroAssembler &ensureMasm(MacroAssembler *masm);
     mozilla::Maybe<MacroAssembler> maybeMasm_;
 
   public:
     MacroAssembler &masm;
 
   protected:
@@ -481,17 +480,16 @@ class CodeGeneratorShared : public LElem
 
     void addCache(LInstruction *lir, size_t cacheIndex);
     size_t addCacheLocations(const CacheLocationList &locs, size_t *numLocs);
     ReciprocalMulConstants computeDivisionConstants(int d);
 
   protected:
     void addOutOfLineCode(OutOfLineCode *code, const MInstruction *mir);
     void addOutOfLineCode(OutOfLineCode *code, const BytecodeSite *site);
-    bool hasOutOfLineCode() { return !outOfLineCode_.empty(); }
     bool generateOutOfLineCode();
 
     Label *labelForBackedgeWithImplicitCheck(MBasicBlock *mir);
 
     // Generate a jump to the start of the specified block, adding information
     // if this is a loop backedge. Use this in place of jumping directly to
     // mir->lir()->label(), or use getJumpLabelForBranch() if a label to use
     // directly is needed.