Bug 1533890: Turn on CacheIR call ICs by default r=mgaudet
authorIain Ireland <iireland@mozilla.com>
Mon, 06 May 2019 20:02:01 +0000
changeset 472773 0258584daaa638523318b5b6fb10fe24e63a05d5
parent 472772 d4b67960c0f921396353762c413b0bd2ef234cb0
child 472774 6c5289f88fb428520af6e8e97b4210418c907e73
push id35978
push usershindli@mozilla.com
push dateTue, 07 May 2019 09:44:39 +0000
treeherdermozilla-central@7aee5a30dd15 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmgaudet
bugs1533890
milestone68.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 1533890: Turn on CacheIR call ICs by default r=mgaudet This patch enables CacheIR call ICs by default, and turns off the old call ICs when CacheIR ICs are turned on. Differential Revision: https://phabricator.services.mozilla.com/D29537
js/src/jit/BaselineIC.cpp
js/src/jit/JitOptions.cpp
--- a/js/src/jit/BaselineIC.cpp
+++ b/js/src/jit/BaselineIC.cpp
@@ -3725,17 +3725,17 @@ bool DoCallFallback(JSContext* cx, Basel
         handled = true;
         break;
       case AttachDecision::Deferred:
         deferred = true;
     }
 
     // Try attaching a regular call stub, but only if the CacheIR attempt didn't
     // add any stubs.
-    if (!handled && !deferred) {
+    if (!handled && !deferred && JitOptions.disableCacheIRCalls) {
       bool createSingleton =
           ObjectGroup::useSingletonForNewObject(cx, script, pc);
       if (!TryAttachCallStub(cx, stub, script, pc, op, argc, vp, constructing,
                              false, createSingleton, &handled)) {
         return false;
       }
     }
   }
@@ -3874,17 +3874,17 @@ bool DoSpreadCallFallback(JSContext* cx,
         break;
       case AttachDecision::Deferred:
         MOZ_ASSERT_UNREACHABLE("No deferred optimizations for spread calls");
         break;
     }
 
     // Try attaching a regular call stub, but only if the CacheIR attempt didn't
     // add any stubs.
-    if (!handled) {
+    if (!handled && JitOptions.disableCacheIRCalls) {
       if (!TryAttachCallStub(cx, stub, script, pc, op, 1, vp, constructing,
                              true, false, &handled)) {
         return false;
       }
     }
   }
 
   if (!SpreadCallOperation(cx, script, pc, thisv, callee, arr, newTarget,
--- a/js/src/jit/JitOptions.cpp
+++ b/js/src/jit/JitOptions.cpp
@@ -118,17 +118,17 @@ DefaultJitOptions::DefaultJitOptions() {
 
   // Toggle whether eager scalar replacement is globally disabled.
   SET_DEFAULT(disableScalarReplacement, false);
 
   // Toggles whether CacheIR stubs are used.
   SET_DEFAULT(disableCacheIR, false);
 
   // Toggles whether CacheIR stubs for calls are used
-  SET_DEFAULT(disableCacheIRCalls, true);
+  SET_DEFAULT(disableCacheIRCalls, false);
 
 // Toggles whether sincos optimization is globally disabled.
 // See bug984018: The MacOS is the only one that has the sincos fast.
 #if defined(XP_MACOSX)
   SET_DEFAULT(disableSincos, false);
 #else
   SET_DEFAULT(disableSincos, true);
 #endif