mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Bug 1130618: Introduce ion.gvn.enable in SetJitCompilerOptions; r=nbp
--HG-- extra : rebase_source : fccc8c74ce080f887246aca2254f9b453bcf810d
This commit is contained in:
parent
8b314aadfe
commit
63e8c030a4
@ -36,7 +36,8 @@ var v = asmLink(asmCompile('global', `
|
||||
|
||||
assertEq(v, NaN);
|
||||
|
||||
// Bug 1130618
|
||||
// Bug 1130618: without GVN
|
||||
setJitCompilerOption("ion.gvn.enable", 0);
|
||||
var v = asmLink(asmCompile('global', `
|
||||
"use asm";
|
||||
var float32x4 = global.SIMD.float32x4;
|
||||
|
@ -168,6 +168,12 @@ JitOptions::isSmallFunction(JSScript *script) const
|
||||
return script->length() <= smallFunctionMaxBytecodeLength_;
|
||||
}
|
||||
|
||||
void
|
||||
JitOptions::enableGvn(bool enable)
|
||||
{
|
||||
disableGvn = !enable;
|
||||
}
|
||||
|
||||
void
|
||||
JitOptions::setEagerCompilation()
|
||||
{
|
||||
|
@ -72,6 +72,7 @@ struct JitOptions
|
||||
void setEagerCompilation();
|
||||
void setCompilerWarmUpThreshold(uint32_t warmUpThreshold);
|
||||
void resetCompilerWarmUpThreshold();
|
||||
void enableGvn(bool val);
|
||||
};
|
||||
|
||||
extern JitOptions js_JitOptions;
|
||||
|
@ -5470,6 +5470,15 @@ JS_SetGlobalJitCompilerOption(JSRuntime *rt, JSJitCompilerOption opt, uint32_t v
|
||||
if (value == 0)
|
||||
jit::js_JitOptions.setEagerCompilation();
|
||||
break;
|
||||
case JSJITCOMPILER_ION_GVN_ENABLE:
|
||||
if (value == 0) {
|
||||
jit::js_JitOptions.enableGvn(false);
|
||||
JitSpew(js::jit::JitSpew_IonScripts, "Disable ion's GVN");
|
||||
} else {
|
||||
jit::js_JitOptions.enableGvn(true);
|
||||
JitSpew(js::jit::JitSpew_IonScripts, "Enable ion's GVN");
|
||||
}
|
||||
break;
|
||||
case JSJITCOMPILER_ION_ENABLE:
|
||||
if (value == 1) {
|
||||
JS::RuntimeOptionsRef(rt).setIon(true);
|
||||
|
@ -4760,11 +4760,12 @@ JS_SetParallelParsingEnabled(JSRuntime *rt, bool enabled);
|
||||
extern JS_PUBLIC_API(void)
|
||||
JS_SetOffthreadIonCompilationEnabled(JSRuntime *rt, bool enabled);
|
||||
|
||||
#define JIT_COMPILER_OPTIONS(Register) \
|
||||
Register(BASELINE_WARMUP_TRIGGER, "baseline.warmup.trigger") \
|
||||
Register(ION_WARMUP_TRIGGER, "ion.warmup.trigger") \
|
||||
Register(ION_ENABLE, "ion.enable") \
|
||||
Register(BASELINE_ENABLE, "baseline.enable") \
|
||||
#define JIT_COMPILER_OPTIONS(Register) \
|
||||
Register(BASELINE_WARMUP_TRIGGER, "baseline.warmup.trigger") \
|
||||
Register(ION_WARMUP_TRIGGER, "ion.warmup.trigger") \
|
||||
Register(ION_GVN_ENABLE, "ion.gvn.enable") \
|
||||
Register(ION_ENABLE, "ion.enable") \
|
||||
Register(BASELINE_ENABLE, "baseline.enable") \
|
||||
Register(OFFTHREAD_COMPILATION_ENABLE, "offthread-compilation.enable") \
|
||||
Register(SIGNALS_ENABLE, "signals.enable")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user