Bug 1533890: Remove obsolete disableCacheIRCalls pref r=mgaudet
authorIain Ireland <iireland@mozilla.com>
Thu, 06 Jun 2019 18:04:55 +0000
changeset 477677 c71a126eea40a642cddfca114f4f75ff71c52041
parent 477676 f5e954d593f83990d3091b3178fec2b0d64a4be2
child 477678 7ce067624706c0623ebf97696ac30c3e3622495c
push id87296
push useriireland@mozilla.com
push dateThu, 06 Jun 2019 18:11:58 +0000
treeherderautoland@c71a126eea40 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmgaudet
bugs1533890
milestone69.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: Remove obsolete disableCacheIRCalls pref r=mgaudet Differential Revision: https://phabricator.services.mozilla.com/D33994
js/src/jit/CacheIR.cpp
js/src/jit/JitOptions.cpp
js/src/jit/JitOptions.h
js/src/shell/js.cpp
--- a/js/src/jit/CacheIR.cpp
+++ b/js/src/jit/CacheIR.cpp
@@ -4796,20 +4796,16 @@ AttachDecision CallIRGenerator::tryAttac
   // attach the stub.
   cacheIRStubKind_ = BaselineCacheIRStubKind::Regular;
 
   trackAttached("IsSuspendedGenerator");
   return AttachDecision::Attach;
 }
 
 AttachDecision CallIRGenerator::tryAttachFunCall() {
-  if (JitOptions.disableCacheIRCalls) {
-    return AttachDecision::NoAction;
-  }
-
   if (!thisval_.isObject() || !thisval_.toObject().is<JSFunction>()) {
     return AttachDecision::NoAction;
   }
   RootedFunction target(cx_, &thisval_.toObject().as<JSFunction>());
 
   bool isScripted = target->isInterpreted() || target->isNativeWithJitEntry();
   MOZ_ASSERT_IF(!isScripted, target->isNative());
 
@@ -4850,20 +4846,16 @@ AttachDecision CallIRGenerator::tryAttac
   } else {
     trackAttached("Native fun_call");
   }
 
   return AttachDecision::Attach;
 }
 
 AttachDecision CallIRGenerator::tryAttachFunApply() {
-  if (JitOptions.disableCacheIRCalls) {
-    return AttachDecision::NoAction;
-  }
-
   if (argc_ != 2) {
     return AttachDecision::NoAction;
   }
 
   if (!thisval_.isObject() || !thisval_.toObject().is<JSFunction>()) {
     return AttachDecision::NoAction;
   }
   RootedFunction target(cx_, &thisval_.toObject().as<JSFunction>());
@@ -5017,20 +5009,16 @@ bool CallIRGenerator::getTemplateObjectF
     result.set(thisObject);
   }
 
   return true;
 }
 
 AttachDecision CallIRGenerator::tryAttachCallScripted(
     HandleFunction calleeFunc) {
-  if (JitOptions.disableCacheIRCalls) {
-    return AttachDecision::NoAction;
-  }
-
   // Never attach optimized scripted call stubs for JSOP_FUNAPPLY.
   // MagicArguments may escape the frame through them.
   if (op_ == JSOP_FUNAPPLY) {
     return AttachDecision::NoAction;
   }
 
   bool isSpecialized = mode_ == ICState::Mode::Specialized;
 
@@ -5237,19 +5225,16 @@ AttachDecision CallIRGenerator::tryAttac
   if (isConstructing && !calleeFunc->isConstructor()) {
     return AttachDecision::NoAction;
   }
 
   // Check for specific native-function optimizations.
   if (isSpecialized) {
     TRY_ATTACH(tryAttachSpecialCaseCallNative(calleeFunc));
   }
-  if (JitOptions.disableCacheIRCalls) {
-    return AttachDecision::NoAction;
-  }
 
   RootedObject templateObj(cx_);
   if (isSpecialized && !getTemplateObjectForNative(calleeFunc, &templateObj)) {
     cx_->clearPendingException();
     return AttachDecision::NoAction;
   }
 
   // Load argc.
@@ -5321,20 +5306,16 @@ bool CallIRGenerator::getTemplateObjectF
       return false;
     }
   }
 
   return true;
 }
 
 AttachDecision CallIRGenerator::tryAttachCallHook(HandleObject calleeObj) {
-  if (JitOptions.disableCacheIRCalls) {
-    return AttachDecision::NoAction;
-  }
-
   if (op_ == JSOP_FUNAPPLY) {
     return AttachDecision::NoAction;
   }
 
   if (mode_ != ICState::Mode::Specialized) {
     // We do not have megamorphic call hook stubs.
     // TODO: Should we attach specialized call hook stubs in
     // megamorphic mode to avoid going generic?
--- a/js/src/jit/JitOptions.cpp
+++ b/js/src/jit/JitOptions.cpp
@@ -117,19 +117,16 @@ DefaultJitOptions::DefaultJitOptions() {
   SET_DEFAULT(disableRecoverIns, false);
 
   // 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, 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
 
--- a/js/src/jit/JitOptions.h
+++ b/js/src/jit/JitOptions.h
@@ -52,17 +52,16 @@ struct DefaultJitOptions {
   bool disableLicm;
   bool disableOptimizationTracking;
   bool disablePgo;
   bool disableInstructionReordering;
   bool disableRangeAnalysis;
   bool disableRecoverIns;
   bool disableScalarReplacement;
   bool disableCacheIR;
-  bool disableCacheIRCalls;
   bool disableSincos;
   bool disableSink;
   bool disableOptimizationLevels;
   bool baselineInterpreter;
   bool forceInlineCaches;
   bool fullDebugChecks;
   bool limitScriptSize;
   bool osr;
--- a/js/src/shell/js.cpp
+++ b/js/src/shell/js.cpp
@@ -10280,22 +10280,18 @@ static bool SetContextOptions(JSContext*
       .setWasmVerbose(enableWasmVerbose)
       .setTestWasmAwaitTier2(enableTestWasmAwaitTier2)
       .setNativeRegExp(enableNativeRegExp)
       .setAsyncStack(enableAsyncStacks);
 
   if (const char* str = op.getStringOption("cache-ir-stubs")) {
     if (strcmp(str, "on") == 0) {
       jit::JitOptions.disableCacheIR = false;
-      jit::JitOptions.disableCacheIRCalls = true;
     } else if (strcmp(str, "off") == 0) {
       jit::JitOptions.disableCacheIR = true;
-    } else if (strcmp(str, "call") == 0) {
-      jit::JitOptions.disableCacheIR = false;
-      jit::JitOptions.disableCacheIRCalls = false;
     } else {
       return OptionFailure("cache-ir-stubs", str);
     }
   }
 
   if (const char* str = op.getStringOption("spectre-mitigations")) {
     if (strcmp(str, "on") == 0) {
       jit::JitOptions.spectreIndexMasking = true;