Bug 851490 - Disable PGO for some functions. r=dvander
authorJan de Mooij <jdemooij@mozilla.com>
Tue, 19 Mar 2013 10:32:07 +0100
changeset 127426 5f25ee4c94ab949c753ca8fb5f65403460ba7632
parent 127425 c67e0e3bfa3d14dfe7af56b2c8862d04c8c31879
child 127427 2db2d953efb69e6406d1665a5140eb0aa3462a7b
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersdvander
bugs851490
milestone22.0a1
Bug 851490 - Disable PGO for some functions. r=dvander
js/src/ion/BaselineIC.cpp
--- a/js/src/ion/BaselineIC.cpp
+++ b/js/src/ion/BaselineIC.cpp
@@ -2175,16 +2175,20 @@ ICToNumber_Fallback::Compiler::generateS
 
     return tailCallVM(DoToNumberFallbackInfo, masm);
 }
 
 //
 // BinaryArith_Fallback
 //
 
+// Disable PGO (see bug 851490).
+#if defined(_MSC_VER)
+# pragma optimize("g", off)
+#endif
 static bool
 DoBinaryArithFallback(JSContext *cx, BaselineFrame *frame, ICBinaryArith_Fallback *stub,
                       HandleValue lhs, HandleValue rhs, MutableHandleValue ret)
 {
     RootedScript script(cx, frame->script());
     jsbytecode *pc = stub->icEntry()->pc(script);
     JSOp op = JSOp(*pc);
     FallbackICSpew(cx, stub, "BinaryArith(%s,%d,%d)", js_CodeName[op],
@@ -2374,16 +2378,19 @@ DoBinaryArithFallback(JSContext *cx, Bas
           }
           default:
             break;
         }
     }
 
     return true;
 }
+#if defined(_MSC_VER)
+# pragma optimize("g", on)
+#endif
 
 typedef bool (*DoBinaryArithFallbackFn)(JSContext *, BaselineFrame *, ICBinaryArith_Fallback *,
                                         HandleValue, HandleValue, MutableHandleValue);
 static const VMFunction DoBinaryArithFallbackInfo =
     FunctionInfo<DoBinaryArithFallbackFn>(DoBinaryArithFallback, PopValues(2));
 
 bool
 ICBinaryArith_Fallback::Compiler::generateStubCode(MacroAssembler &masm)
@@ -2723,16 +2730,20 @@ ICBinaryArith_DoubleWithInt32::Compiler:
     EmitStubGuardFailure(masm);
     return true;
 }
 
 //
 // UnaryArith_Fallback
 //
 
+// Disable PGO (see bug 851490).
+#if defined(_MSC_VER)
+# pragma optimize("g", off)
+#endif
 static bool
 DoUnaryArithFallback(JSContext *cx, BaselineFrame *frame, ICUnaryArith_Fallback *stub,
                      HandleValue val, MutableHandleValue res)
 {
     RootedScript script(cx, frame->script());
     jsbytecode *pc = stub->icEntry()->pc(script);
     JSOp op = JSOp(*pc);
     FallbackICSpew(cx, stub, "UnaryArith(%s)", js_CodeName[op]);
@@ -2779,16 +2790,19 @@ DoUnaryArithFallback(JSContext *cx, Base
         if (!doubleStub)
             return false;
         stub->addNewStub(doubleStub);
         return true;
     }
 
     return true;
 }
+#if defined(_MSC_VER)
+# pragma optimize("g", on)
+#endif
 
 typedef bool (*DoUnaryArithFallbackFn)(JSContext *, BaselineFrame *, ICUnaryArith_Fallback *,
                                        HandleValue, MutableHandleValue);
 static const VMFunction DoUnaryArithFallbackInfo =
     FunctionInfo<DoUnaryArithFallbackFn>(DoUnaryArithFallback, PopValues(1));
 
 bool
 ICUnaryArith_Fallback::Compiler::generateStubCode(MacroAssembler &masm)