Bug 953164 - Undo debug code that wasn't part of the review, r=me
☠☠ backed out by 20226f09d059 ☠ ☠
authorHannes Verschore <hv1989@gmail.com>
Wed, 26 Feb 2014 12:41:29 +0100
changeset 170626 6f7f5787e46e0ad5cf3610924555f7e32ed6d7ea
parent 170625 3a23bcbc4e60663cf49d8faddf9ce27948c20669
child 170658 a6c42421bb9d13e33361df9455202796d49464c9
push id40270
push userhv1989@gmail.com
push dateWed, 26 Feb 2014 11:44:28 +0000
treeherdermozilla-inbound@6f7f5787e46e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs953164
milestone30.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 953164 - Undo debug code that wasn't part of the review, r=me
js/src/jit/Ion.cpp
js/src/jit/IonAnalysis.cpp
js/src/jit/IonBuilder.cpp
--- a/js/src/jit/Ion.cpp
+++ b/js/src/jit/Ion.cpp
@@ -1372,18 +1372,18 @@ OptimizeMIR(MIRGenerator *mir)
 
     if (mir->optimizationInfo().eliminateRedundantChecksEnabled()) {
         // Note: check elimination has to run after all other passes that move
         // instructions. Since check uses are replaced with the actual index,
         // code motion after this pass could incorrectly move a load or store
         // before its bounds check.
         if (!EliminateRedundantChecks(graph))
             return false;
+        IonSpewPass("Bounds Check Elimination");
         AssertGraphCoherency(graph);
-        IonSpewPass("Bounds Check Elimination");
     }
 
     return true;
 }
 
 LIRGraph *
 GenerateLIR(MIRGenerator *mir)
 {
@@ -1391,17 +1391,17 @@ GenerateLIR(MIRGenerator *mir)
 
     LIRGraph *lir = mir->alloc().lifoAlloc()->new_<LIRGraph>(&graph);
     if (!lir)
         return nullptr;
 
     LIRGenerator lirgen(mir, graph, *lir);
     if (!lirgen.generate())
         return nullptr;
-    //IonSpewPass("Generate LIR");
+    IonSpewPass("Generate LIR");
 
     if (mir->shouldCancel("Generate LIR"))
         return nullptr;
 
     AllocationIntegrityState integrity(*lir);
 
     switch (mir->optimizationInfo().registerAllocator()) {
       case RegisterAllocator_LSRA: {
@@ -1414,17 +1414,17 @@ GenerateLIR(MIRGenerator *mir)
         if (!regalloc.go())
             return nullptr;
 
 #ifdef DEBUG
         if (!integrity.check(false))
             return nullptr;
 #endif
 
-        //IonSpewPass("Allocate Registers [LSRA]", &regalloc);
+        IonSpewPass("Allocate Registers [LSRA]", &regalloc);
         break;
       }
 
       case RegisterAllocator_Backtracking: {
 #ifdef DEBUG
         if (!integrity.record())
             return nullptr;
 #endif
@@ -1433,47 +1433,47 @@ GenerateLIR(MIRGenerator *mir)
         if (!regalloc.go())
             return nullptr;
 
 #ifdef DEBUG
         if (!integrity.check(false))
             return nullptr;
 #endif
 
-        //IonSpewPass("Allocate Registers [Backtracking]");
+        IonSpewPass("Allocate Registers [Backtracking]");
         break;
       }
 
       case RegisterAllocator_Stupid: {
         // Use the integrity checker to populate safepoint information, so
         // run it in all builds.
         if (!integrity.record())
             return nullptr;
 
         StupidAllocator regalloc(mir, &lirgen, *lir);
         if (!regalloc.go())
             return nullptr;
         if (!integrity.check(true))
             return nullptr;
-        //IonSpewPass("Allocate Registers [Stupid]");
+        IonSpewPass("Allocate Registers [Stupid]");
         break;
       }
 
       default:
         MOZ_ASSUME_UNREACHABLE("Bad regalloc");
     }
 
     if (mir->shouldCancel("Allocate Registers"))
         return nullptr;
 
     // Now that all optimization and register allocation is done, re-introduce
     // critical edges to avoid unnecessary jumps.
     if (!UnsplitEdges(lir))
         return nullptr;
-    //IonSpewPass("Unsplit Critical Edges");
+    IonSpewPass("Unsplit Critical Edges");
     AssertBasicGraphCoherency(graph);
 
     return lir;
 }
 
 CodeGenerator *
 GenerateCode(MIRGenerator *mir, LIRGraph *lir, MacroAssembler *maybeMasm)
 {
--- a/js/src/jit/IonAnalysis.cpp
+++ b/js/src/jit/IonAnalysis.cpp
@@ -1282,32 +1282,29 @@ jit::AssertBasicGraphCoherency(MIRGraph 
         JS_ASSERT(!osrBlock->unreachable());
     }
 
     if (MResumePoint *resumePoint = graph.entryResumePoint())
         JS_ASSERT(resumePoint->block() == graph.entryBlock());
 
     // Assert successor and predecessor list coherency.
     uint32_t count = 0;
-    size_t compares = 0;
     for (MBasicBlockIterator block(graph.begin()); block != graph.end(); block++) {
         count++;
 
         JS_ASSERT(&block->graph() == &graph);
 
         for (size_t i = 0; i < block->numSuccessors(); i++)
             JS_ASSERT(CheckSuccessorImpliesPredecessor(*block, block->getSuccessor(i)));
 
         for (size_t i = 0; i < block->numPredecessors(); i++)
             JS_ASSERT(CheckPredecessorImpliesSuccessor(*block, block->getPredecessor(i)));
 
         // Assert that use chains are valid for this instruction.
         for (MDefinitionIterator iter(*block); iter; iter++) {
-            if (iter->isCompare())
-                compares++;
             for (uint32_t i = 0, e = iter->numOperands(); i < e; i++)
                 JS_ASSERT(CheckOperandImpliesUse(*iter, iter->getOperand(i)));
         }
         for (MResumePointIterator iter(block->resumePointsBegin()); iter != block->resumePointsEnd(); iter++) {
             for (uint32_t i = 0, e = iter->numOperands(); i < e; i++) {
                 if (iter->getUseFor(i)->hasProducer())
                     JS_ASSERT(CheckOperandImpliesUse(*iter, iter->getOperand(i)));
             }
--- a/js/src/jit/IonBuilder.cpp
+++ b/js/src/jit/IonBuilder.cpp
@@ -3027,23 +3027,22 @@ IonBuilder::filterTypesAtTest(MTest *tes
     if (!subject)
         return true;
 
     // There is no TypeSet that can get filtered.
     if (!subject->resultTypeSet())
         return true;
 
     // Only do this optimization if the typeset does contains null or undefined.
-    if (!((removeUndefined && subject->resultTypeSet()->hasType(types::Type::UndefinedType())) ||
-        (removeNull && subject->resultTypeSet()->hasType(types::Type::NullType()))))
+    if ((!(removeUndefined && subject->resultTypeSet()->hasType(types::Type::UndefinedType())) &&
+         !(removeNull && subject->resultTypeSet()->hasType(types::Type::NullType()))))
     {
         return true;
     }
 
-    //printf("%d: replacing\n", script()->lineno());
     // Find all values on the stack that correspond to the subject
     // and replace it with a MIR with filtered TypeSet information.
     // Create the replacement MIR lazily upon first occurence.
     MDefinition *replace = nullptr;
     for (uint32_t i = 0; i < current->stackDepth(); i++) {
         if (current->getSlot(i) != subject)
             continue;