Bug 1124002 - Remove unnecessary object/symbol checks in MBinaryArithInstruction::infer. r=h4writer
authorJan de Mooij <jdemooij@mozilla.com>
Wed, 21 Jan 2015 23:06:42 +0100
changeset 225027 65aea1c559fdc00a6e9993eb99facb290890b6d5
parent 225026 71176e216d5315206972135ff0712e6d494d5ac0
child 225028 f7439bc62b8b7234503d1ac1ecc1cec5d7489981
push id28152
push usercbook@mozilla.com
push dateThu, 22 Jan 2015 13:37:12 +0000
treeherdermozilla-central@86f9d0128ccf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersh4writer
bugs1124002
milestone38.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 1124002 - Remove unnecessary object/symbol checks in MBinaryArithInstruction::infer. r=h4writer
js/src/jit/MIR.cpp
--- a/js/src/jit/MIR.cpp
+++ b/js/src/jit/MIR.cpp
@@ -2234,24 +2234,16 @@ SimpleArithOperand(MDefinition *op)
 
 void
 MBinaryArithInstruction::infer(TempAllocator &alloc, BaselineInspector *inspector, jsbytecode *pc)
 {
     MOZ_ASSERT(this->type() == MIRType_Value);
 
     specialization_ = MIRType_None;
 
-    // Don't specialize if one operand could be an object or symbol. If we
-    // specialize as int32 or double based on baseline feedback, we could DCE
-    // this instruction and fail to invoke any valueOf methods.
-    if (getOperand(0)->mightBeType(MIRType_Object) || getOperand(1)->mightBeType(MIRType_Object))
-        return;
-    if (getOperand(0)->mightBeType(MIRType_Symbol) || getOperand(1)->mightBeType(MIRType_Symbol))
-        return;
-
     // Anything complex - strings, symbols, and objects - are not specialized
     // unless baseline type hints suggest it might be profitable
     if (!SimpleArithOperand(getOperand(0)) || !SimpleArithOperand(getOperand(1)))
         return inferFallback(inspector, pc);
 
     // Retrieve type information of lhs and rhs.
     MIRType lhs = getOperand(0)->type();
     MIRType rhs = getOperand(1)->type();