Skip to content
Permalink
Browse files
[JSC] Add forceUnlinkedDFG option
https://bugs.webkit.org/show_bug.cgi?id=239751

Reviewed by Saam Barati.

This patch adds forceUnlinkedDFG option to start running tests with unlinked DFG (while it is not truly unlinked yet).

* Tools/Scripts/run-jsc-stress-tests:
* Source/JavaScriptCore/jit/JITOperations.cpp:
(JSC::JSC_DEFINE_JIT_OPERATION):
* Source/JavaScriptCore/runtime/OptionsList.h:
* JSTests/stress/arith-abs-on-various-types.js:
* JSTests/stress/arith-abs-to-arith-negate-range-optimizaton.js:
* JSTests/stress/arith-acos-on-various-types.js:
* JSTests/stress/arith-acosh-on-various-types.js:
* JSTests/stress/arith-asin-on-various-types.js:
* JSTests/stress/arith-asinh-on-various-types.js:
* JSTests/stress/arith-atan-on-various-types.js:
* JSTests/stress/arith-atanh-on-various-types.js:
* JSTests/stress/arith-cbrt-on-various-types.js:
* JSTests/stress/arith-ceil-on-various-types.js:
* JSTests/stress/arith-clz32-on-various-types.js:
* JSTests/stress/arith-cos-on-various-types.js:
* JSTests/stress/arith-cosh-on-various-types.js:
* JSTests/stress/arith-expm1-on-various-types.js:
* JSTests/stress/arith-floor-on-various-types.js:
* JSTests/stress/arith-fround-on-various-types.js:
* JSTests/stress/arith-log-on-various-types.js:
* JSTests/stress/arith-log10-on-various-types.js:
* JSTests/stress/arith-log2-on-various-types.js:
* JSTests/stress/arith-round-on-various-types.js:
* JSTests/stress/arith-sin-on-various-types.js:
* JSTests/stress/arith-sinh-on-various-types.js:
* JSTests/stress/arith-sqrt-on-various-types.js:
* JSTests/stress/arith-tan-on-various-types.js:
* JSTests/stress/arith-tanh-on-various-types.js:
* JSTests/stress/arith-trunc-on-various-types.js:
* JSTests/stress/fold-multi-get-by-offset-to-get-by-offset-with-watchpoint.js:

Canonical link: https://commits.webkit.org/250009@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@293473 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Constellation committed Apr 26, 2022
1 parent 2e690e1 commit 96f919b9cc1050fd14cb0eb16856033abd4d8de5
Show file tree
Hide file tree
Showing 34 changed files with 94 additions and 3 deletions.
@@ -1,3 +1,40 @@
2022-04-26 Yusuke Suzuki <ysuzuki@apple.com>

[JSC] Add forceUnlinkedDFG option
https://bugs.webkit.org/show_bug.cgi?id=239751

Reviewed by Saam Barati.

Attach `forceUnlinkedDFG=0` option to the following tests which require careful story of how DFG is compiled, which is changed with unlinked DFG.

* stress/arith-abs-on-various-types.js:
* stress/arith-abs-to-arith-negate-range-optimizaton.js:
* stress/arith-acos-on-various-types.js:
* stress/arith-acosh-on-various-types.js:
* stress/arith-asin-on-various-types.js:
* stress/arith-asinh-on-various-types.js:
* stress/arith-atan-on-various-types.js:
* stress/arith-atanh-on-various-types.js:
* stress/arith-cbrt-on-various-types.js:
* stress/arith-ceil-on-various-types.js:
* stress/arith-clz32-on-various-types.js:
* stress/arith-cos-on-various-types.js:
* stress/arith-cosh-on-various-types.js:
* stress/arith-expm1-on-various-types.js:
* stress/arith-floor-on-various-types.js:
* stress/arith-fround-on-various-types.js:
* stress/arith-log-on-various-types.js:
* stress/arith-log10-on-various-types.js:
* stress/arith-log2-on-various-types.js:
* stress/arith-round-on-various-types.js:
* stress/arith-sin-on-various-types.js:
* stress/arith-sinh-on-various-types.js:
* stress/arith-sqrt-on-various-types.js:
* stress/arith-tan-on-various-types.js:
* stress/arith-tanh-on-various-types.js:
* stress/arith-trunc-on-various-types.js:
* stress/fold-multi-get-by-offset-to-get-by-offset-with-watchpoint.js:

2022-04-26 Michael Catanzaro <mcatanzaro@redhat.com>

Several internationalization tests broken with ICU 69.1
@@ -1,4 +1,5 @@
//@ skip if not $jitTests
//@ requireOptions("--forceUnlinkedDFG=0")
//@ defaultNoEagerRun
"use strict";

@@ -1,4 +1,5 @@
//@ skip if not $jitTests
//@ requireOptions("--forceUnlinkedDFG=0")
//@ defaultNoEagerRun
"use strict";

@@ -1,4 +1,5 @@
//@ skip if not $jitTests
//@ requireOptions("--forceUnlinkedDFG=0")
//@ defaultNoEagerRun
"use strict";

@@ -1,4 +1,5 @@
//@ skip if not $jitTests
//@ requireOptions("--forceUnlinkedDFG=0")
//@ defaultNoEagerRun
"use strict";

@@ -1,4 +1,5 @@
//@ skip if not $jitTests
//@ requireOptions("--forceUnlinkedDFG=0")
//@ defaultNoEagerRun
"use strict";

@@ -1,4 +1,5 @@
//@ skip if not $jitTests
//@ requireOptions("--forceUnlinkedDFG=0")
//@ defaultNoEagerRun
"use strict";

@@ -1,4 +1,5 @@
//@ skip if not $jitTests
//@ requireOptions("--forceUnlinkedDFG=0")
//@ defaultNoEagerRun
"use strict";

@@ -1,4 +1,5 @@
//@ skip if not $jitTests
//@ requireOptions("--forceUnlinkedDFG=0")
//@ defaultNoEagerRun
"use strict";

@@ -1,4 +1,5 @@
//@ skip if not $jitTests
//@ requireOptions("--forceUnlinkedDFG=0")
//@ defaultNoEagerRun
"use strict";

@@ -1,4 +1,5 @@
//@ skip if not $jitTests
//@ requireOptions("--forceUnlinkedDFG=0")
//@ defaultNoEagerRun
"use strict";

@@ -1,4 +1,5 @@
//@ skip if not $jitTests
//@ requireOptions("--forceUnlinkedDFG=0")
//@ defaultNoEagerRun
"use strict";

@@ -1,4 +1,5 @@
//@ skip if not $jitTests
//@ requireOptions("--forceUnlinkedDFG=0")
//@ defaultNoEagerRun
"use strict";

@@ -1,4 +1,5 @@
//@ skip if not $jitTests
//@ requireOptions("--forceUnlinkedDFG=0")
//@ defaultNoEagerRun
"use strict";

@@ -1,4 +1,5 @@
//@ skip if not $jitTests
//@ requireOptions("--forceUnlinkedDFG=0")
//@ defaultNoEagerRun
"use strict";

@@ -1,4 +1,5 @@
//@ skip if not $jitTests
//@ requireOptions("--forceUnlinkedDFG=0")
//@ defaultNoEagerRun
"use strict";

@@ -1,4 +1,5 @@
//@ skip if not $jitTests
//@ requireOptions("--forceUnlinkedDFG=0")
//@ defaultNoEagerRun
"use strict";

@@ -1,4 +1,5 @@
//@ skip if not $jitTests
//@ requireOptions("--forceUnlinkedDFG=0")
//@ runNoCJITValidatePhases
//@ runFTLNoCJITValidate
"use strict";
@@ -1,4 +1,5 @@
//@ skip if not $jitTests
//@ requireOptions("--forceUnlinkedDFG=0")
//@ defaultNoEagerRun
"use strict";

@@ -1,4 +1,5 @@
//@ skip if not $jitTests
//@ requireOptions("--forceUnlinkedDFG=0")
//@ defaultNoEagerRun
"use strict";

@@ -1,4 +1,5 @@
//@ skip if not $jitTests
//@ requireOptions("--forceUnlinkedDFG=0")
//@ defaultNoEagerRun
"use strict";

@@ -1,4 +1,5 @@
//@ skip if not $jitTests
//@ requireOptions("--forceUnlinkedDFG=0")
//@ defaultNoEagerRun
"use strict";

@@ -1,4 +1,5 @@
//@ skip if not $jitTests
//@ requireOptions("--forceUnlinkedDFG=0")
//@ defaultNoEagerRun
"use strict";

@@ -1,4 +1,5 @@
//@ skip if not $jitTests
//@ requireOptions("--forceUnlinkedDFG=0")
//@ defaultNoEagerRun
"use strict";

@@ -1,4 +1,5 @@
//@ skip if not $jitTests
//@ requireOptions("--forceUnlinkedDFG=0")
//@ defaultNoEagerRun
"use strict";

@@ -1,4 +1,5 @@
//@ skip if not $jitTests
//@ requireOptions("--forceUnlinkedDFG=0")
//@ defaultNoEagerRun
"use strict";

@@ -1,4 +1,5 @@
//@ skip if not $jitTests
//@ requireOptions("--forceUnlinkedDFG=0")
//@ defaultNoEagerRun
"use strict";

@@ -1,3 +1,4 @@
//@ requireOptions("--forceUnlinkedDFG=0")
//@ defaultNoEagerRun

function foo(o) {
@@ -1,3 +1,18 @@
2022-04-26 Yusuke Suzuki <ysuzuki@apple.com>

[JSC] Add forceUnlinkedDFG option
https://bugs.webkit.org/show_bug.cgi?id=239751

Reviewed by Saam Barati.

This patch adds forceUnlinkedDFG option to start running tests with unlinked DFG (while it is not truly unlinked yet).

* jit/JITOperations.cpp:
(JSC::JSC_DEFINE_JIT_OPERATION):
* runtime/Options.cpp:
(JSC::Options::recomputeDependentOptions):
* runtime/OptionsList.h:

2022-04-26 Elliott Williams <emw@apple.com>

Fix build error: "cp: JavaScriptCore.profdata is not a directory"
@@ -1953,7 +1953,7 @@ JSC_DEFINE_JIT_OPERATION(operationOptimize, SlowPathReturnType, (VM* vmPointer,
// possible in order to minimize the chances of us executing baseline code after
// optimized code is already available.
JITWorklist::State worklistState = JITWorklist::ensureGlobalWorklist().completeAllReadyPlansForVM(
vm, JITCompilationKey(codeBlock, JITCompilationMode::DFG));
vm, JITCompilationKey(codeBlock, Options::forceUnlinkedDFG() ? JITCompilationMode::UnlinkedDFG : JITCompilationMode::DFG));

if (worklistState == JITWorklist::Compiling) {
CODEBLOCK_LOG_EVENT(codeBlock, "delayOptimizeToDFG", ("compiling"));
@@ -2027,7 +2027,7 @@ JSC_DEFINE_JIT_OPERATION(operationOptimize, SlowPathReturnType, (VM* vmPointer,

CodeBlock* replacementCodeBlock = codeBlock->newReplacement();
CompilationResult result = DFG::compile(
vm, replacementCodeBlock, nullptr, JITCompilationMode::DFG, bytecodeIndex,
vm, replacementCodeBlock, nullptr, Options::forceUnlinkedDFG() ? JITCompilationMode::UnlinkedDFG : JITCompilationMode::DFG, bytecodeIndex,
mustHandleValues, JITToDFGDeferredCompilationCallback::create());

if (result != CompilationSuccessful) {
@@ -439,6 +439,7 @@ void Options::recomputeDependentOptions()

#if !CPU(X86_64) && !CPU(ARM64)
Options::useConcurrentGC() = false;
Options::forceUnlinkedDFG() = false;
#endif

// At initialization time, we may decide that useJIT should be false for any
@@ -102,6 +102,7 @@ bool canUseWebAssemblyFastMemory();
\
v(Bool, forceCodeBlockLiveness, false, Normal, nullptr) \
v(Bool, forceICFailure, false, Normal, nullptr) \
v(Bool, forceUnlinkedDFG, false, Normal, nullptr) \
\
v(Unsigned, repatchCountForCoolDown, 8, Normal, nullptr) \
v(Unsigned, initialCoolDownCount, 20, Normal, nullptr) \
@@ -1,3 +1,12 @@
2022-04-26 Yusuke Suzuki <ysuzuki@apple.com>

[JSC] Add forceUnlinkedDFG option
https://bugs.webkit.org/show_bug.cgi?id=239751

Reviewed by Saam Barati.

* Scripts/run-jsc-stress-tests:

2022-04-26 Wenson Hsieh <wenson_hsieh@apple.com>

Show the option to Markup Image in the callout bar only when appropriate
@@ -623,7 +623,7 @@ BASE_OPTIONS = ["--useFTLJIT=false", "--useFunctionDotArguments=true", "--valida
EAGER_OPTIONS = ["--thresholdForJITAfterWarmUp=10", "--thresholdForJITSoon=10", "--thresholdForOptimizeAfterWarmUp=20", "--thresholdForOptimizeAfterLongWarmUp=20", "--thresholdForOptimizeSoon=20", "--thresholdForFTLOptimizeAfterWarmUp=20", "--thresholdForFTLOptimizeSoon=20", "--thresholdForOMGOptimizeAfterWarmUp=20", "--thresholdForOMGOptimizeSoon=20", "--maximumEvalCacheableSourceLength=150000", "--useEagerCodeBlockJettisonTiming=true", "--repatchBufferingCountdown=0"]
# NOTE: Tests rely on this using scribbleFreeCells.
NO_CJIT_OPTIONS = ["--useConcurrentJIT=false", "--thresholdForJITAfterWarmUp=100", "--scribbleFreeCells=true"]
B3O1_OPTIONS = ["--defaultB3OptLevel=1", "--useDataICInOptimizingJIT=1"]
B3O1_OPTIONS = ["--defaultB3OptLevel=1", "--useDataICInOptimizingJIT=1", "--forceUnlinkedDFG=1"]
B3O0_OPTIONS = ["--maxDFGNodesInBasicBlockForPreciseAnalysis=100", "--defaultB3OptLevel=0"]
FTL_OPTIONS = ["--useFTLJIT=true"]
FORCE_LLINT_EXIT_OPTIONS = ["--forceOSRExitToLLInt=true"]
@@ -1118,6 +1118,7 @@ BASE_MODES = [
"--useSamplingProfiler=true",
"--airForceIRCAllocator=true",
"--useDataICInOptimizingJIT=true",
"--forceUnlinkedDFG=true",
] +
FTL_OPTIONS +
NO_CJIT_OPTIONS

0 comments on commit 96f919b

Please sign in to comment.