Commit cf3b84d6 authored by Iain Ireland's avatar Iain Ireland
Browse files

Bug 1664357: Tweak thresholds for --fast-warmup r=jandem

To make sure we're testing recursive inlining, I've tweaked the thresholds to ensure that we can inline two levels deep without any loops. I've also made the inlining heuristics slightly more conservative, which prevents `check-earley-boyer` from timing out.

I've also included a few drive-by fixes. The change to `isRecursive` in `DoTrialInlining` only affects the jitspew message, because both ways of finding the `InliningRoot` are equivalent for the non-recursive case.

Differential Revision: https://phabricator.services.mozilla.com/D89875
parent fbafb648
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -330,12 +330,12 @@ void DefaultJitOptions::setEagerIonCompilation() {
void DefaultJitOptions::setFastWarmUp() {
  baselineInterpreterWarmUpThreshold = 4;
  baselineJitWarmUpThreshold = 10;
  trialInliningWarmUpThreshold = 16;
  normalIonWarmUpThreshold = 25;
  fullIonWarmUpThreshold = 55;
  trialInliningWarmUpThreshold = 14;
  normalIonWarmUpThreshold = 30;
  fullIonWarmUpThreshold = 65;

  inliningEntryThreshold = 0;
  smallFunctionMaxBytecodeLength = INT32_MAX;
  inliningEntryThreshold = 2;
  smallFunctionMaxBytecodeLength = 2000;
}

void DefaultJitOptions::setWarpEnabled(bool enable) {
+2 −2
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ bool DoTrialInlining(JSContext* cx, BaselineFrame* frame) {

  RootedScript script(cx, frame->script());
  ICScript* icScript = frame->icScript();
  bool isRecursive = !!icScript->inliningRoot();
  bool isRecursive = icScript->depth() > 0;

  if (!script->canIonCompile()) {
    return true;
@@ -293,7 +293,7 @@ ICScript* TrialInliner::createInlinedICScript(JSFunction* target,
  MOZ_ASSERT(result->numICEntries() == targetScript->numICEntries());

  JitSpew(JitSpew_WarpTrialInlining,
          "Outer ICScript: %p Inner ICScript: %p pcOffset: %u\n", icScript_,
          "Outer ICScript: %p Inner ICScript: %p pcOffset: %u", icScript_,
          result, pcOffset);

  return result;
+2 −4
Original line number Diff line number Diff line
@@ -537,11 +537,9 @@ bool WarpBuilder::buildInlinePrologue() {
  }

  // Initialize local slots.
  if (info().nlocals() > 0) {
  for (uint32_t i = 0; i < info().nlocals(); i++) {
    current->initSlot(info().localSlot(i), undef);
  }
  }

  MOZ_ASSERT(current->entryResumePoint()->stackDepth() == info().totalSlots());