Bug 1054340 - Remove PcOffset IR instructions. r=h4writer
authorKannan Vijayan <kvijayan@mozilla.com>
Sun, 17 Aug 2014 15:58:16 -0400
changeset 221653 7e2e5dffbb2e59ba83c880a28c46ddd76c9cdf2b
parent 221652 e826a3acc243a1e40375de402b53bbf8af81db97
child 221654 13a4173fde390ff0e1a655ca2a978035e0403e36
push id3979
push userraliiev@mozilla.com
push dateMon, 13 Oct 2014 16:35:44 +0000
treeherdermozilla-beta@30f2cc610691 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersh4writer
bugs1054340
milestone34.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 1054340 - Remove PcOffset IR instructions. r=h4writer
js/src/jit/CodeGenerator.cpp
js/src/jit/CodeGenerator.h
js/src/jit/IonBuilder.cpp
js/src/jit/LIR-Common.h
js/src/jit/LOpcodes.h
js/src/jit/Lowering.cpp
js/src/jit/Lowering.h
js/src/jit/MIR.h
js/src/jit/MOpcodes.h
js/src/jit/ParallelSafetyAnalysis.cpp
--- a/js/src/jit/CodeGenerator.cpp
+++ b/js/src/jit/CodeGenerator.cpp
@@ -1405,25 +1405,16 @@ CodeGenerator::visitCallee(LCallee *lir)
 
 bool
 CodeGenerator::visitStart(LStart *lir)
 {
     return true;
 }
 
 bool
-CodeGenerator::visitPcOffset(LPcOffset *lir)
-{
-    if (!addNativeToBytecodeEntry(lir->mir()->trackedSite()))
-        return false;
-
-    return true;
-}
-
-bool
 CodeGenerator::visitReturn(LReturn *lir)
 {
 #if defined(JS_NUNBOX32)
     DebugOnly<LAllocation *> type    = lir->getOperand(TYPE_INDEX);
     DebugOnly<LAllocation *> payload = lir->getOperand(PAYLOAD_INDEX);
     JS_ASSERT(ToRegister(type)    == JSReturnReg_Type);
     JS_ASSERT(ToRegister(payload) == JSReturnReg_Data);
 #elif defined(JS_PUNBOX64)
--- a/js/src/jit/CodeGenerator.h
+++ b/js/src/jit/CodeGenerator.h
@@ -63,17 +63,16 @@ class CodeGenerator : public CodeGenerat
     bool visitOsiPoint(LOsiPoint *lir);
     bool visitGoto(LGoto *lir);
     bool visitTableSwitch(LTableSwitch *ins);
     bool visitTableSwitchV(LTableSwitchV *ins);
     bool visitCloneLiteral(LCloneLiteral *lir);
     bool visitParameter(LParameter *lir);
     bool visitCallee(LCallee *lir);
     bool visitStart(LStart *lir);
-    bool visitPcOffset(LPcOffset *lir);
     bool visitReturn(LReturn *ret);
     bool visitDefVar(LDefVar *lir);
     bool visitDefFun(LDefFun *lir);
     bool visitOsrEntry(LOsrEntry *lir);
     bool visitOsrScopeChain(LOsrScopeChain *lir);
     bool visitOsrValue(LOsrValue *lir);
     bool visitOsrReturnValue(LOsrReturnValue *lir);
     bool visitOsrArgumentsObject(LOsrArgumentsObject *lir);
--- a/js/src/jit/IonBuilder.cpp
+++ b/js/src/jit/IonBuilder.cpp
@@ -1272,19 +1272,16 @@ IonBuilder::traverseBytecode()
 
         for (unsigned i = 0; i < nuses; i++) {
             MDefinition *def = current->peek(-int32_t(i + 1));
             if (!popped.append(def) || !poppedUses.append(def->defUseCount()))
                 return false;
         }
 #endif
 
-        if (isNativeToBytecodeMapEnabled())
-            current->add(MPcOffset::New(alloc()));
-
         // Nothing in inspectOpcode() is allowed to advance the pc.
         JSOp op = JSOp(*pc);
         if (!inspectOpcode(op))
             return false;
 
 #ifdef DEBUG
         for (size_t i = 0; i < popped.length(); i++) {
             switch (op) {
--- a/js/src/jit/LIR-Common.h
+++ b/js/src/jit/LIR-Common.h
@@ -3389,27 +3389,16 @@ class LValueToString : public LInstructi
 // register allocation as it doesn't need to sniff the snapshot out of the
 // LIRGraph.
 class LStart : public LInstructionHelper<0, 0, 0>
 {
   public:
     LIR_HEADER(Start)
 };
 
-// No-op instruction that prints nativeOffset, script, pcOffset during codegen.
-class LPcOffset : public LInstructionHelper<0, 0, 0>
-{
-  public:
-    LIR_HEADER(PcOffset)
-
-    const MPcOffset *mir() const {
-        return mir_->toPcOffset();
-    }
-};
-
 // Passed the BaselineFrame address in the OsrFrameReg by SideCannon().
 // Forwards this object to the LOsrValues for Value materialization.
 class LOsrEntry : public LInstructionHelper<1, 0, 0>
 {
   protected:
     Label label_;
     uint32_t frameDepth_;
 
--- a/js/src/jit/LOpcodes.h
+++ b/js/src/jit/LOpcodes.h
@@ -151,17 +151,16 @@
     _(Float32ToInt32)               \
     _(TruncateDToInt32)             \
     _(TruncateFToInt32)             \
     _(BooleanToString)              \
     _(IntToString)                  \
     _(DoubleToString)               \
     _(ValueToString)                \
     _(Start)                        \
-    _(PcOffset)                     \
     _(OsrEntry)                     \
     _(OsrValue)                     \
     _(OsrScopeChain)                \
     _(OsrReturnValue)               \
     _(OsrArgumentsObject)           \
     _(RegExp)                       \
     _(RegExpExec)                   \
     _(RegExpTest)                   \
--- a/js/src/jit/Lowering.cpp
+++ b/js/src/jit/Lowering.cpp
@@ -1670,23 +1670,16 @@ LIRGenerator::visitStart(MStart *start)
         return false;
 
     if (start->startType() == MStart::StartType_Default)
         lirGraph_.setEntrySnapshot(lir->snapshot());
     return add(lir);
 }
 
 bool
-LIRGenerator::visitPcOffset(MPcOffset *pcOffset)
-{
-    LPcOffset *lir = new(alloc()) LPcOffset;
-    return add(lir, pcOffset);
-}
-
-bool
 LIRGenerator::visitNop(MNop *nop)
 {
     return true;
 }
 
 bool
 LIRGenerator::visitLimitedTruncate(MLimitedTruncate *nop)
 {
--- a/js/src/jit/Lowering.h
+++ b/js/src/jit/Lowering.h
@@ -136,17 +136,16 @@ class LIRGenerator : public LIRGenerator
     bool visitDiv(MDiv *ins);
     bool visitMod(MMod *ins);
     bool visitConcat(MConcat *ins);
     bool visitConcatPar(MConcatPar *ins);
     bool visitCharCodeAt(MCharCodeAt *ins);
     bool visitFromCharCode(MFromCharCode *ins);
     bool visitStringSplit(MStringSplit *ins);
     bool visitStart(MStart *start);
-    bool visitPcOffset(MPcOffset *pcOffset);
     bool visitOsrEntry(MOsrEntry *entry);
     bool visitNop(MNop *nop);
     bool visitLimitedTruncate(MLimitedTruncate *nop);
     bool visitOsrValue(MOsrValue *value);
     bool visitOsrScopeChain(MOsrScopeChain *object);
     bool visitOsrReturnValue(MOsrReturnValue *value);
     bool visitOsrArgumentsObject(MOsrArgumentsObject *object);
     bool visitToDouble(MToDouble *convert);
--- a/js/src/jit/MIR.h
+++ b/js/src/jit/MIR.h
@@ -1106,34 +1106,16 @@ class MStart : public MNullaryInstructio
         return new(alloc) MStart(startType);
     }
 
     StartType startType() {
         return startType_;
     }
 };
 
-class MPcOffset : public MNullaryInstruction
-{
-  private:
-    MPcOffset() {
-        setGuard();
-    }
-
-  public:
-    INSTRUCTION_HEADER(PcOffset)
-    static MPcOffset *New(TempAllocator &alloc) {
-        return new(alloc) MPcOffset();
-    }
-
-    AliasSet getAliasSet() const {
-        return AliasSet::None();
-    }
-};
-
 // Instruction marking on entrypoint for on-stack replacement.
 // OSR may occur at loop headers (at JSOP_TRACE).
 // There is at most one MOsrEntry per MIRGraph.
 class MOsrEntry : public MNullaryInstruction
 {
   protected:
     MOsrEntry() {
         setResultType(MIRType_Pointer);
--- a/js/src/jit/MOpcodes.h
+++ b/js/src/jit/MOpcodes.h
@@ -101,17 +101,16 @@ namespace jit {
     _(ObjectState)                                                          \
     _(ArrayState)                                                           \
     _(InitElem)                                                             \
     _(InitElemGetterSetter)                                                 \
     _(MutateProto)                                                          \
     _(InitProp)                                                             \
     _(InitPropGetterSetter)                                                 \
     _(Start)                                                                \
-    _(PcOffset)                                                             \
     _(OsrEntry)                                                             \
     _(Nop)                                                                  \
     _(LimitedTruncate)                                                      \
     _(RegExp)                                                               \
     _(RegExpExec)                                                           \
     _(RegExpTest)                                                           \
     _(RegExpReplace)                                                        \
     _(StringReplace)                                                        \
--- a/js/src/jit/ParallelSafetyAnalysis.cpp
+++ b/js/src/jit/ParallelSafetyAnalysis.cpp
@@ -194,17 +194,16 @@ class ParallelSafetyVisitor : public MDe
     SAFE_OP(ObjectState)
     SAFE_OP(ArrayState)
     UNSAFE_OP(InitElem)
     UNSAFE_OP(InitElemGetterSetter)
     UNSAFE_OP(MutateProto)
     UNSAFE_OP(InitProp)
     UNSAFE_OP(InitPropGetterSetter)
     SAFE_OP(Start)
-    SAFE_OP(PcOffset)
     UNSAFE_OP(OsrEntry)
     SAFE_OP(Nop)
     SAFE_OP(LimitedTruncate)
     UNSAFE_OP(RegExp)
     CUSTOM_OP(Lambda)
     UNSAFE_OP(LambdaArrow)
     SAFE_OP(Slots)
     SAFE_OP(Elements)