зеркало из https://github.com/mozilla/gecko-dev.git
Bug 939614: IonMonkey: Rename IonOption to JitOption, r=jandem
This commit is contained in:
Родитель
f03d2221bd
Коммит
9be9631c0c
|
@ -957,7 +957,7 @@ static bool
|
|||
EnableOsiPointRegisterChecks(JSContext *, unsigned, jsval *vp)
|
||||
{
|
||||
#if defined(JS_ION) && defined(CHECK_OSIPOINT_REGISTERS)
|
||||
jit::js_IonOptions.checkOsiPointRegisters = true;
|
||||
jit::js_JitOptions.checkOsiPointRegisters = true;
|
||||
#endif
|
||||
JS_SET_RVAL(cx, vp, JSVAL_VOID);
|
||||
return true;
|
||||
|
@ -1140,7 +1140,7 @@ SetIonCheckGraphCoherency(JSContext *cx, unsigned argc, jsval *vp)
|
|||
{
|
||||
CallArgs args = CallArgsFromVp(argc, vp);
|
||||
#ifdef JS_ION
|
||||
jit::js_IonOptions.checkGraphConsistency = ToBoolean(args.get(0));
|
||||
jit::js_JitOptions.checkGraphConsistency = ToBoolean(args.get(0));
|
||||
#endif
|
||||
args.rval().setUndefined();
|
||||
return true;
|
||||
|
|
|
@ -196,7 +196,7 @@ jit::CheckFrequentBailouts(JSContext *cx, JSScript *script)
|
|||
// we compile this script LICM will be disabled.
|
||||
IonScript *ionScript = script->ionScript();
|
||||
|
||||
if (ionScript->numBailouts() >= js_IonOptions.frequentBailoutThreshold &&
|
||||
if (ionScript->numBailouts() >= js_JitOptions.frequentBailoutThreshold &&
|
||||
!script->hadFrequentBailouts())
|
||||
{
|
||||
script->setHadFrequentBailouts();
|
||||
|
|
|
@ -276,7 +276,7 @@ CanEnterBaselineJIT(JSContext *cx, HandleScript script, bool osr)
|
|||
if (IsJSDEnabled(cx) || cx->runtime()->parallelWarmup > 0) {
|
||||
if (osr)
|
||||
return Method_Skipped;
|
||||
} else if (script->incUseCount() <= js_IonOptions.baselineUsesBeforeCompile) {
|
||||
} else if (script->incUseCount() <= js_JitOptions.baselineUsesBeforeCompile) {
|
||||
return Method_Skipped;
|
||||
}
|
||||
|
||||
|
|
|
@ -1738,7 +1738,7 @@ IonCompile(JSContext *cx, JSScript *script,
|
|||
ionCompiling.construct();
|
||||
|
||||
Maybe<AutoProtectHeapForIonCompilation> protect;
|
||||
if (js_IonOptions.checkThreadSafety &&
|
||||
if (js_JitOptions.checkThreadSafety &&
|
||||
cx->runtime()->gcIncrementalState == gc::NO_INCREMENTAL &&
|
||||
!cx->runtime()->profilingScripts &&
|
||||
!cx->runtime()->spsProfiler.enabled())
|
||||
|
@ -1822,7 +1822,7 @@ static const uint32_t MAX_DOM_WORKER_LOCALS_AND_ARGS = 2048;
|
|||
static MethodStatus
|
||||
CheckScriptSize(JSContext *cx, JSScript* script)
|
||||
{
|
||||
if (!js_IonOptions.limitScriptSize)
|
||||
if (!js_JitOptions.limitScriptSize)
|
||||
return Method_Compiled;
|
||||
|
||||
if (script->length() > MAX_OFF_THREAD_SCRIPT_SIZE) {
|
||||
|
@ -1899,7 +1899,7 @@ Compile(JSContext *cx, HandleScript script, BaselineFrame *osrFrame, jsbytecode
|
|||
JS_ASSERT(jit::IsIonEnabled(cx));
|
||||
JS_ASSERT(jit::IsBaselineEnabled(cx));
|
||||
JS_ASSERT_IF(osrPc != nullptr, (JSOp)*osrPc == JSOP_LOOPENTRY);
|
||||
JS_ASSERT_IF(executionMode == ParallelExecution, !osrFrame && !osrPC);
|
||||
JS_ASSERT_IF(executionMode == ParallelExecution, !osrFrame && !osrPc);
|
||||
JS_ASSERT_IF(executionMode == ParallelExecution, !HasIonScript(script, executionMode));
|
||||
|
||||
if (!script->hasBaselineScript())
|
||||
|
@ -1937,7 +1937,7 @@ Compile(JSContext *cx, HandleScript script, BaselineFrame *osrFrame, jsbytecode
|
|||
// recompile with the right pc.
|
||||
if (osrPc && script->ionScript()->osrPc() != osrPc) {
|
||||
uint32_t count = script->ionScript()->incrOsrPcMismatchCounter();
|
||||
if (count <= js_IonOptions.osrPcMismatchesBeforeRecompile)
|
||||
if (count <= js_JitOptions.osrPcMismatchesBeforeRecompile)
|
||||
return Method_Skipped;
|
||||
|
||||
failedState = Method_Skipped;
|
||||
|
@ -2000,7 +2000,7 @@ jit::CanEnterAtBranch(JSContext *cx, JSScript *script, BaselineFrame *osrFrame,
|
|||
return Method_Skipped;
|
||||
|
||||
// Optionally ignore on user request.
|
||||
if (!js_IonOptions.osr)
|
||||
if (!js_JitOptions.osr)
|
||||
return Method_Skipped;
|
||||
|
||||
// Mark as forbidden if frame can't be handled.
|
||||
|
@ -2083,7 +2083,7 @@ jit::CanEnter(JSContext *cx, RunState &state)
|
|||
// If --ion-eager is used, compile with Baseline first, so that we
|
||||
// can directly enter IonMonkey.
|
||||
RootedScript rscript(cx, script);
|
||||
if (js_IonOptions.eagerCompilation && !rscript->hasBaselineScript()) {
|
||||
if (js_JitOptions.eagerCompilation && !rscript->hasBaselineScript()) {
|
||||
MethodStatus status = CanEnterBaselineMethod(cx, state);
|
||||
if (status != Method_Compiled)
|
||||
return status;
|
||||
|
@ -2755,7 +2755,7 @@ jit::UsesBeforeIonCompile(JSScript *script, jsbytecode *pc)
|
|||
if (numLocalsAndArgs > MAX_MAIN_THREAD_LOCALS_AND_ARGS)
|
||||
minUses = minUses * (numLocalsAndArgs / (double) MAX_MAIN_THREAD_LOCALS_AND_ARGS);
|
||||
|
||||
if (JSOp(*pc) != JSOP_LOOPENTRY || js_IonOptions.eagerCompilation)
|
||||
if (JSOp(*pc) != JSOP_LOOPENTRY || js_JitOptions.eagerCompilation)
|
||||
return minUses;
|
||||
|
||||
// It's more efficient to enter outer loops, rather than inner loops, via OSR.
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
#include "jit/CompileInfo.h"
|
||||
#include "jit/CompileWrappers.h"
|
||||
#include "jit/IonOptions.h"
|
||||
#include "jit/JitOptions.h"
|
||||
|
||||
namespace js {
|
||||
namespace jit {
|
||||
|
@ -175,7 +175,7 @@ IsIonInlinablePC(jsbytecode *pc) {
|
|||
inline bool
|
||||
TooManyArguments(unsigned nargs)
|
||||
{
|
||||
return (nargs >= SNAPSHOT_MAX_NARGS || nargs > js_IonOptions.maxStackArgs);
|
||||
return (nargs >= SNAPSHOT_MAX_NARGS || nargs > js_JitOptions.maxStackArgs);
|
||||
}
|
||||
|
||||
void ForbidCompilation(JSContext *cx, JSScript *script);
|
||||
|
|
|
@ -1356,7 +1356,7 @@ void
|
|||
jit::AssertGraphCoherency(MIRGraph &graph)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
if (!js_IonOptions.checkGraphConsistency)
|
||||
if (!js_JitOptions.checkGraphConsistency)
|
||||
return;
|
||||
AssertBasicGraphCoherency(graph);
|
||||
AssertReversePostOrder(graph);
|
||||
|
@ -1371,7 +1371,7 @@ jit::AssertExtendedGraphCoherency(MIRGraph &graph)
|
|||
// are split)
|
||||
|
||||
#ifdef DEBUG
|
||||
if (!js_IonOptions.checkGraphConsistency)
|
||||
if (!js_JitOptions.checkGraphConsistency)
|
||||
return;
|
||||
AssertGraphCoherency(graph);
|
||||
|
||||
|
|
|
@ -2088,7 +2088,7 @@ IonBuilder::restartLoop(CFGState state)
|
|||
{
|
||||
spew("New types at loop header, restarting loop body");
|
||||
|
||||
if (js_IonOptions.limitScriptSize) {
|
||||
if (js_JitOptions.limitScriptSize) {
|
||||
if (++numLoopRestarts_ >= MAX_LOOP_RESTARTS)
|
||||
return ControlStatus_Abort;
|
||||
}
|
||||
|
@ -3488,7 +3488,7 @@ IonBuilder::jsop_try()
|
|||
{
|
||||
JS_ASSERT(JSOp(*pc) == JSOP_TRY);
|
||||
|
||||
if (!js_IonOptions.compileTryCatch)
|
||||
if (!js_JitOptions.compileTryCatch)
|
||||
return abort("Try-catch support disabled");
|
||||
|
||||
// Try-finally is not yet supported.
|
||||
|
@ -4046,7 +4046,7 @@ IonBuilder::makeInliningDecision(JSFunction *target, CallInfo &callInfo)
|
|||
// Skip heuristics if we have an explicit hint to inline.
|
||||
if (!targetScript->shouldInline()) {
|
||||
// Cap the inlining depth.
|
||||
if (js_IonOptions.isSmallFunction(targetScript)) {
|
||||
if (js_JitOptions.isSmallFunction(targetScript)) {
|
||||
if (inliningDepth_ >= optimizationInfo().smallFunctionMaxInlineDepth())
|
||||
return DontInline(targetScript, "Vetoed: exceeding allowed inline depth");
|
||||
} else {
|
||||
|
|
|
@ -1106,7 +1106,7 @@ static void
|
|||
MarkJitActivation(JSTracer *trc, const JitActivationIterator &activations)
|
||||
{
|
||||
#ifdef CHECK_OSIPOINT_REGISTERS
|
||||
if (js_IonOptions.checkOsiPointRegisters) {
|
||||
if (js_JitOptions.checkOsiPointRegisters) {
|
||||
// GC can modify spilled registers, breaking our register checks.
|
||||
// To handle this, we disable these checks for the current VM call
|
||||
// when a GC happens.
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "jsbytecode.h"
|
||||
#include "jstypes.h"
|
||||
|
||||
#include "jit/IonOptions.h"
|
||||
#include "jit/JitOptions.h"
|
||||
#include "js/TypeDecls.h"
|
||||
|
||||
namespace js {
|
||||
|
@ -99,41 +99,41 @@ class OptimizationInfo
|
|||
}
|
||||
|
||||
bool inlineInterpreted() const {
|
||||
return inlineInterpreted_ && !js_IonOptions.disableInlining;
|
||||
return inlineInterpreted_ && !js_JitOptions.disableInlining;
|
||||
}
|
||||
|
||||
bool inlineNative() const {
|
||||
return inlineNative_ && !js_IonOptions.disableInlining;
|
||||
return inlineNative_ && !js_JitOptions.disableInlining;
|
||||
}
|
||||
|
||||
uint32_t usesBeforeCompile() const {
|
||||
if (js_IonOptions.forceDefaultIonUsesBeforeCompile)
|
||||
return js_IonOptions.forcedDefaultIonUsesBeforeCompile;
|
||||
if (js_JitOptions.forceDefaultIonUsesBeforeCompile)
|
||||
return js_JitOptions.forcedDefaultIonUsesBeforeCompile;
|
||||
return usesBeforeCompile_;
|
||||
}
|
||||
|
||||
bool gvnEnabled() const {
|
||||
return gvn_ && !js_IonOptions.disableGvn;
|
||||
return gvn_ && !js_JitOptions.disableGvn;
|
||||
}
|
||||
|
||||
bool licmEnabled() const {
|
||||
return licm_ && !js_IonOptions.disableLicm;
|
||||
return licm_ && !js_JitOptions.disableLicm;
|
||||
}
|
||||
|
||||
bool uceEnabled() const {
|
||||
return uce_ && !js_IonOptions.disableUce;
|
||||
return uce_ && !js_JitOptions.disableUce;
|
||||
}
|
||||
|
||||
bool rangeAnalysisEnabled() const {
|
||||
return rangeAnalysis_ && !js_IonOptions.disableRangeAnalysis;
|
||||
return rangeAnalysis_ && !js_JitOptions.disableRangeAnalysis;
|
||||
}
|
||||
|
||||
bool eaaEnabled() const {
|
||||
return eaa_ && !js_IonOptions.disableEaa;
|
||||
return eaa_ && !js_JitOptions.disableEaa;
|
||||
}
|
||||
|
||||
bool edgeCaseAnalysisEnabled() const {
|
||||
return edgeCaseAnalysis_ && !js_IonOptions.disableEdgeCaseAnalysis;
|
||||
return edgeCaseAnalysis_ && !js_JitOptions.disableEdgeCaseAnalysis;
|
||||
}
|
||||
|
||||
bool eliminateRedundantChecksEnabled() const {
|
||||
|
@ -141,15 +141,15 @@ class OptimizationInfo
|
|||
}
|
||||
|
||||
IonGvnKind gvnKind() const {
|
||||
if (!js_IonOptions.forceGvnKind)
|
||||
if (!js_JitOptions.forceGvnKind)
|
||||
return gvnKind_;
|
||||
return js_IonOptions.forcedGvnKind;
|
||||
return js_JitOptions.forcedGvnKind;
|
||||
}
|
||||
|
||||
IonRegisterAllocator registerAllocator() const {
|
||||
if (!js_IonOptions.forceRegisterAllocator)
|
||||
if (!js_JitOptions.forceRegisterAllocator)
|
||||
return registerAllocator_;
|
||||
return js_IonOptions.forcedRegisterAllocator;
|
||||
return js_JitOptions.forcedRegisterAllocator;
|
||||
}
|
||||
|
||||
uint32_t smallFunctionMaxInlineDepth() const {
|
||||
|
|
|
@ -4,7 +4,9 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "jit/IonOptions.h"
|
||||
#include "jit/JitOptions.h"
|
||||
|
||||
#include "jsscript.h"
|
||||
|
||||
using namespace js;
|
||||
using namespace js::jit;
|
||||
|
@ -12,9 +14,9 @@ using namespace js::jit;
|
|||
namespace js {
|
||||
namespace jit {
|
||||
|
||||
IonOptions js_IonOptions;
|
||||
JitOptions js_JitOptions;
|
||||
|
||||
IonOptions::IonOptions()
|
||||
JitOptions::JitOptions()
|
||||
{
|
||||
// Whether to perform expensive graph-consistency DEBUG-only assertions.
|
||||
// It can be useful to disable this to reduce DEBUG-compile time of large
|
||||
|
@ -115,13 +117,13 @@ IonOptions::IonOptions()
|
|||
}
|
||||
|
||||
bool
|
||||
IonOptions::isSmallFunction(JSScript *script) const
|
||||
JitOptions::isSmallFunction(JSScript *script) const
|
||||
{
|
||||
return script->length() <= smallFunctionMaxBytecodeLength_;
|
||||
}
|
||||
|
||||
void
|
||||
IonOptions::setEagerCompilation()
|
||||
JitOptions::setEagerCompilation()
|
||||
{
|
||||
eagerCompilation = true;
|
||||
baselineUsesBeforeCompile = 0;
|
||||
|
@ -130,27 +132,27 @@ IonOptions::setEagerCompilation()
|
|||
}
|
||||
|
||||
void
|
||||
IonOptions::setUsesBeforeCompile(uint32_t useCount)
|
||||
JitOptions::setUsesBeforeCompile(uint32_t useCount)
|
||||
{
|
||||
forceDefaultIonUsesBeforeCompile = true;
|
||||
forcedDefaultIonUsesBeforeCompile = useCount;
|
||||
|
||||
// Undo eager compilation
|
||||
if (eagerCompilation && useCount != 0) {
|
||||
jit::IonOptions defaultValues;
|
||||
jit::JitOptions defaultValues;
|
||||
eagerCompilation = false;
|
||||
baselineUsesBeforeCompile = defaultValues.baselineUsesBeforeCompile;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
IonOptions::resetUsesBeforeCompile()
|
||||
JitOptions::resetUsesBeforeCompile()
|
||||
{
|
||||
forceDefaultIonUsesBeforeCompile = false;
|
||||
|
||||
// Undo eager compilation
|
||||
if (eagerCompilation) {
|
||||
jit::IonOptions defaultValues;
|
||||
jit::JitOptions defaultValues;
|
||||
eagerCompilation = false;
|
||||
baselineUsesBeforeCompile = defaultValues.baselineUsesBeforeCompile;
|
||||
}
|
||||
|
|
|
@ -4,10 +4,11 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef jit_IonOptions_h
|
||||
#define jit_IonOptions_h
|
||||
#ifndef jit_JitOptions_h
|
||||
#define jit_JitOptions_h
|
||||
|
||||
#include "jit/IonTypes.h"
|
||||
#include "js/TypeDecls.h"
|
||||
|
||||
#ifdef JS_ION
|
||||
|
||||
|
@ -26,7 +27,7 @@ enum IonGvnKind {
|
|||
GVN_Pessimistic
|
||||
};
|
||||
|
||||
struct IonOptions
|
||||
struct JitOptions
|
||||
{
|
||||
bool checkGraphConsistency;
|
||||
#ifdef CHECK_OSIPOINT_REGISTERS
|
||||
|
@ -59,18 +60,18 @@ struct IonOptions
|
|||
uint32_t smallFunctionMaxBytecodeLength_;
|
||||
uint32_t usesBeforeCompilePar;
|
||||
|
||||
IonOptions();
|
||||
JitOptions();
|
||||
bool isSmallFunction(JSScript *script) const;
|
||||
void setEagerCompilation();
|
||||
void setUsesBeforeCompile(uint32_t useCount);
|
||||
void resetUsesBeforeCompile();
|
||||
};
|
||||
|
||||
extern IonOptions js_IonOptions;
|
||||
extern JitOptions js_JitOptions;
|
||||
|
||||
} // namespace jit
|
||||
} // namespace js
|
||||
|
||||
#endif // JS_ION
|
||||
|
||||
#endif /* jit_IonOptions_h */
|
||||
#endif /* jit_JitOptions_h */
|
||||
|
|
|
@ -1150,7 +1150,7 @@ LinearScanAllocator::canCoexist(LiveInterval *a, LiveInterval *b)
|
|||
void
|
||||
LinearScanAllocator::validateIntervals()
|
||||
{
|
||||
if (!js_IonOptions.checkGraphConsistency)
|
||||
if (!js_JitOptions.checkGraphConsistency)
|
||||
return;
|
||||
|
||||
for (IntervalIterator i(active.begin()); i != active.end(); i++) {
|
||||
|
@ -1196,7 +1196,7 @@ LinearScanAllocator::validateIntervals()
|
|||
void
|
||||
LinearScanAllocator::validateAllocations()
|
||||
{
|
||||
if (!js_IonOptions.checkGraphConsistency)
|
||||
if (!js_JitOptions.checkGraphConsistency)
|
||||
return;
|
||||
|
||||
for (IntervalIterator i(handled.begin()); i != handled.end(); i++) {
|
||||
|
|
|
@ -600,7 +600,7 @@ class LiveRangeAllocator : protected RegisterAllocator
|
|||
void validateVirtualRegisters()
|
||||
{
|
||||
#ifdef DEBUG
|
||||
if (!js_IonOptions.checkGraphConsistency)
|
||||
if (!js_JitOptions.checkGraphConsistency)
|
||||
return;
|
||||
|
||||
for (size_t i = 1; i < graph.numVirtualRegisters(); i++) {
|
||||
|
|
|
@ -517,7 +517,7 @@ LIRGenerator::visitAssertFloat32(MAssertFloat32 *assertion)
|
|||
if (!allowFloat32Optimizations())
|
||||
return true;
|
||||
|
||||
if (type != MIRType_Value && !js_IonOptions.eagerCompilation) {
|
||||
if (type != MIRType_Value && !js_JitOptions.eagerCompilation) {
|
||||
JS_ASSERT_IF(checkIsFloat32, type == MIRType_Float32);
|
||||
JS_ASSERT_IF(!checkIsFloat32, type != MIRType_Float32);
|
||||
}
|
||||
|
|
|
@ -2042,7 +2042,7 @@ RangeAnalysis::analyze()
|
|||
bool
|
||||
RangeAnalysis::addRangeAssertions()
|
||||
{
|
||||
if (!js_IonOptions.checkRangeAnalysis)
|
||||
if (!js_JitOptions.checkRangeAnalysis)
|
||||
return true;
|
||||
|
||||
// Check the computed range for this instruction, if the option is set. Note
|
||||
|
|
|
@ -602,7 +602,7 @@ CodeGeneratorShared::verifyOsiPointRegs(LSafepoint *safepoint)
|
|||
bool
|
||||
CodeGeneratorShared::shouldVerifyOsiPointRegs(LSafepoint *safepoint)
|
||||
{
|
||||
if (!js_IonOptions.checkOsiPointRegisters)
|
||||
if (!js_JitOptions.checkOsiPointRegisters)
|
||||
return false;
|
||||
|
||||
if (gen->info().executionMode() != SequentialExecution)
|
||||
|
|
|
@ -5995,19 +5995,19 @@ JS_SetGlobalJitCompilerOption(JSContext *cx, JSJitCompilerOption opt, uint32_t v
|
|||
switch (opt) {
|
||||
case JSJITCOMPILER_BASELINE_USECOUNT_TRIGGER:
|
||||
if (value == uint32_t(-1)) {
|
||||
jit::IonOptions defaultValues;
|
||||
jit::JitOptions defaultValues;
|
||||
value = defaultValues.baselineUsesBeforeCompile;
|
||||
}
|
||||
jit::js_IonOptions.baselineUsesBeforeCompile = value;
|
||||
jit::js_JitOptions.baselineUsesBeforeCompile = value;
|
||||
break;
|
||||
case JSJITCOMPILER_ION_USECOUNT_TRIGGER:
|
||||
if (value == uint32_t(-1)) {
|
||||
jit::js_IonOptions.resetUsesBeforeCompile();
|
||||
jit::js_JitOptions.resetUsesBeforeCompile();
|
||||
break;
|
||||
}
|
||||
jit::js_IonOptions.setUsesBeforeCompile(value);
|
||||
jit::js_JitOptions.setUsesBeforeCompile(value);
|
||||
if (value == 0)
|
||||
jit::js_IonOptions.setEagerCompilation();
|
||||
jit::js_JitOptions.setEagerCompilation();
|
||||
break;
|
||||
case JSJITCOMPILER_ION_ENABLE:
|
||||
if (value == 1) {
|
||||
|
|
|
@ -257,8 +257,8 @@ if CONFIG['ENABLE_ION']:
|
|||
'jit/IonFrames.cpp',
|
||||
'jit/IonMacroAssembler.cpp',
|
||||
'jit/IonOptimizationLevels.cpp',
|
||||
'jit/IonOptions.cpp',
|
||||
'jit/IonSpewer.cpp',
|
||||
'jit/JitOptions.cpp',
|
||||
'jit/JSONSpewer.cpp',
|
||||
'jit/LICM.cpp',
|
||||
'jit/LinearScan.cpp',
|
||||
|
|
|
@ -5470,13 +5470,13 @@ ProcessArgs(JSContext *cx, JSObject *obj_, OptionParser *op)
|
|||
|
||||
if (const char *str = op->getStringOption("ion-gvn")) {
|
||||
if (strcmp(str, "off") == 0) {
|
||||
jit::js_IonOptions.disableGvn = true;
|
||||
jit::js_JitOptions.disableGvn = true;
|
||||
} else if (strcmp(str, "pessimistic") == 0) {
|
||||
jit::js_IonOptions.forceGvnKind = true;
|
||||
jit::js_IonOptions.forcedGvnKind = jit::GVN_Pessimistic;
|
||||
jit::js_JitOptions.forceGvnKind = true;
|
||||
jit::js_JitOptions.forcedGvnKind = jit::GVN_Pessimistic;
|
||||
} else if (strcmp(str, "optimistic") == 0) {
|
||||
jit::js_IonOptions.forceGvnKind = true;
|
||||
jit::js_IonOptions.forcedGvnKind = jit::GVN_Optimistic;
|
||||
jit::js_JitOptions.forceGvnKind = true;
|
||||
jit::js_JitOptions.forcedGvnKind = jit::GVN_Optimistic;
|
||||
} else {
|
||||
return OptionFailure("ion-gvn", str);
|
||||
}
|
||||
|
@ -5484,95 +5484,95 @@ ProcessArgs(JSContext *cx, JSObject *obj_, OptionParser *op)
|
|||
|
||||
if (const char *str = op->getStringOption("ion-licm")) {
|
||||
if (strcmp(str, "on") == 0)
|
||||
jit::js_IonOptions.disableLicm = false;
|
||||
jit::js_JitOptions.disableLicm = false;
|
||||
else if (strcmp(str, "off") == 0)
|
||||
jit::js_IonOptions.disableLicm = true;
|
||||
jit::js_JitOptions.disableLicm = true;
|
||||
else
|
||||
return OptionFailure("ion-licm", str);
|
||||
}
|
||||
|
||||
if (const char *str = op->getStringOption("ion-edgecase-analysis")) {
|
||||
if (strcmp(str, "on") == 0)
|
||||
jit::js_IonOptions.disableEdgeCaseAnalysis = false;
|
||||
jit::js_JitOptions.disableEdgeCaseAnalysis = false;
|
||||
else if (strcmp(str, "off") == 0)
|
||||
jit::js_IonOptions.disableEdgeCaseAnalysis = true;
|
||||
jit::js_JitOptions.disableEdgeCaseAnalysis = true;
|
||||
else
|
||||
return OptionFailure("ion-edgecase-analysis", str);
|
||||
}
|
||||
|
||||
if (const char *str = op->getStringOption("ion-range-analysis")) {
|
||||
if (strcmp(str, "on") == 0)
|
||||
jit::js_IonOptions.disableRangeAnalysis = false;
|
||||
jit::js_JitOptions.disableRangeAnalysis = false;
|
||||
else if (strcmp(str, "off") == 0)
|
||||
jit::js_IonOptions.disableRangeAnalysis = true;
|
||||
jit::js_JitOptions.disableRangeAnalysis = true;
|
||||
else
|
||||
return OptionFailure("ion-range-analysis", str);
|
||||
}
|
||||
|
||||
if (op->getBoolOption("ion-check-range-analysis"))
|
||||
jit::js_IonOptions.checkRangeAnalysis = true;
|
||||
jit::js_JitOptions.checkRangeAnalysis = true;
|
||||
|
||||
if (op->getBoolOption("ion-check-thread-safety"))
|
||||
jit::js_IonOptions.checkThreadSafety = true;
|
||||
jit::js_JitOptions.checkThreadSafety = true;
|
||||
|
||||
if (const char *str = op->getStringOption("ion-inlining")) {
|
||||
if (strcmp(str, "on") == 0)
|
||||
jit::js_IonOptions.disableInlining = false;
|
||||
jit::js_JitOptions.disableInlining = false;
|
||||
else if (strcmp(str, "off") == 0)
|
||||
jit::js_IonOptions.disableInlining = true;
|
||||
jit::js_JitOptions.disableInlining = true;
|
||||
else
|
||||
return OptionFailure("ion-inlining", str);
|
||||
}
|
||||
|
||||
if (const char *str = op->getStringOption("ion-osr")) {
|
||||
if (strcmp(str, "on") == 0)
|
||||
jit::js_IonOptions.osr = true;
|
||||
jit::js_JitOptions.osr = true;
|
||||
else if (strcmp(str, "off") == 0)
|
||||
jit::js_IonOptions.osr = false;
|
||||
jit::js_JitOptions.osr = false;
|
||||
else
|
||||
return OptionFailure("ion-osr", str);
|
||||
}
|
||||
|
||||
if (const char *str = op->getStringOption("ion-limit-script-size")) {
|
||||
if (strcmp(str, "on") == 0)
|
||||
jit::js_IonOptions.limitScriptSize = true;
|
||||
jit::js_JitOptions.limitScriptSize = true;
|
||||
else if (strcmp(str, "off") == 0)
|
||||
jit::js_IonOptions.limitScriptSize = false;
|
||||
jit::js_JitOptions.limitScriptSize = false;
|
||||
else
|
||||
return OptionFailure("ion-limit-script-size", str);
|
||||
}
|
||||
|
||||
int32_t useCount = op->getIntOption("ion-uses-before-compile");
|
||||
if (useCount >= 0)
|
||||
jit::js_IonOptions.setUsesBeforeCompile(useCount);
|
||||
jit::js_JitOptions.setUsesBeforeCompile(useCount);
|
||||
|
||||
useCount = op->getIntOption("baseline-uses-before-compile");
|
||||
if (useCount >= 0)
|
||||
jit::js_IonOptions.baselineUsesBeforeCompile = useCount;
|
||||
jit::js_JitOptions.baselineUsesBeforeCompile = useCount;
|
||||
|
||||
if (op->getBoolOption("baseline-eager"))
|
||||
jit::js_IonOptions.baselineUsesBeforeCompile = 0;
|
||||
jit::js_JitOptions.baselineUsesBeforeCompile = 0;
|
||||
|
||||
if (const char *str = op->getStringOption("ion-regalloc")) {
|
||||
if (strcmp(str, "lsra") == 0) {
|
||||
jit::js_IonOptions.forceRegisterAllocator = true;
|
||||
jit::js_IonOptions.forcedRegisterAllocator = jit::RegisterAllocator_LSRA;
|
||||
jit::js_JitOptions.forceRegisterAllocator = true;
|
||||
jit::js_JitOptions.forcedRegisterAllocator = jit::RegisterAllocator_LSRA;
|
||||
} else if (strcmp(str, "backtracking") == 0) {
|
||||
jit::js_IonOptions.forceRegisterAllocator = true;
|
||||
jit::js_IonOptions.forcedRegisterAllocator = jit::RegisterAllocator_Backtracking;
|
||||
jit::js_JitOptions.forceRegisterAllocator = true;
|
||||
jit::js_JitOptions.forcedRegisterAllocator = jit::RegisterAllocator_Backtracking;
|
||||
} else if (strcmp(str, "stupid") == 0) {
|
||||
jit::js_IonOptions.forceRegisterAllocator = true;
|
||||
jit::js_IonOptions.forcedRegisterAllocator = jit::RegisterAllocator_Stupid;
|
||||
jit::js_JitOptions.forceRegisterAllocator = true;
|
||||
jit::js_JitOptions.forcedRegisterAllocator = jit::RegisterAllocator_Stupid;
|
||||
} else {
|
||||
return OptionFailure("ion-regalloc", str);
|
||||
}
|
||||
}
|
||||
|
||||
if (op->getBoolOption("ion-eager"))
|
||||
jit::js_IonOptions.setEagerCompilation();
|
||||
jit::js_JitOptions.setEagerCompilation();
|
||||
|
||||
if (op->getBoolOption("ion-compile-try-catch"))
|
||||
jit::js_IonOptions.compileTryCatch = true;
|
||||
jit::js_JitOptions.compileTryCatch = true;
|
||||
|
||||
bool parallelCompilation = true;
|
||||
if (const char *str = op->getStringOption("ion-parallel-compile")) {
|
||||
|
|
|
@ -2218,8 +2218,8 @@ js::ParallelTestsShouldPass(JSContext *cx)
|
|||
{
|
||||
return jit::IsIonEnabled(cx) &&
|
||||
jit::IsBaselineEnabled(cx) &&
|
||||
!jit::js_IonOptions.eagerCompilation &&
|
||||
jit::js_IonOptions.baselineUsesBeforeCompile != 0 &&
|
||||
!jit::js_JitOptions.eagerCompilation &&
|
||||
jit::js_JitOptions.baselineUsesBeforeCompile != 0 &&
|
||||
cx->runtime()->gcZeal() == 0;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче