use ignition + turbofan + turbo_from_bytecode for sourceless code
This commit is contained in:
parent
0b25191b3d
commit
1a2ac1aeb2
64
patches/ignition.patch
Normal file
64
patches/ignition.patch
Normal file
@ -0,0 +1,64 @@
|
||||
From 9f165610d692d5785ab4596d7769421ae18ad4a3 Mon Sep 17 00:00:00 2001
|
||||
From: Igor Klopov <igor@klopov.com>
|
||||
Date: Sun, 25 Sep 2016 18:46:33 +0300
|
||||
Subject: use ignition+turbofan for sourceless code
|
||||
|
||||
|
||||
diff --git a/deps/v8/src/compiler.cc b/deps/v8/src/compiler.cc
|
||||
index 9a5afe9..bf612c6 100644
|
||||
--- a/deps/v8/src/compiler.cc
|
||||
+++ b/deps/v8/src/compiler.cc
|
||||
@@ -439,11 +439,15 @@ void EnsureFeedbackMetadata(CompilationInfo* info) {
|
||||
CHECK(!info->shared_info()->feedback_metadata()->SpecDiffersFrom(
|
||||
info->literal()->feedback_vector_spec()));
|
||||
}
|
||||
|
||||
bool ShouldUseIgnition(CompilationInfo* info) {
|
||||
- if (!FLAG_ignition) return false;
|
||||
+ ParseInfo* parse_info = info->parse_info();
|
||||
+ Isolate* isolate = parse_info->isolate();
|
||||
+ bool flag = FLAG_ignition || !FLAG_lazy ||
|
||||
+ parse_info->script()->source()->IsUndefined(isolate);
|
||||
+ if (!flag) return false;
|
||||
|
||||
DCHECK(info->has_shared_info());
|
||||
|
||||
// When requesting debug code as a replacement for existing code, we provide
|
||||
// the same kind as the existing code (to prevent implicit tier-change).
|
||||
@@ -648,12 +652,18 @@ bool UseTurboFan(Handle<SharedFunctionInfo> shared) {
|
||||
!optimization_disabled;
|
||||
|
||||
// 3. Explicitly enabled by the command-line filter.
|
||||
bool passes_turbo_filter = shared->PassesFilter(FLAG_turbo_filter);
|
||||
|
||||
+ // 4. Same option as in ShouldUseIgnition.
|
||||
+ Isolate* isolate = shared->GetIsolate();
|
||||
+ Script* script = Script::cast(shared->script());
|
||||
+ bool sourceless_ignition = !FLAG_lazy ||
|
||||
+ script->source()->IsUndefined(isolate);
|
||||
+
|
||||
return is_turbofanable_asm || is_unsupported_by_crankshaft_but_turbofanable ||
|
||||
- passes_turbo_filter;
|
||||
+ passes_turbo_filter || sourceless_ignition;
|
||||
}
|
||||
|
||||
bool GetOptimizedCodeNow(CompilationJob* job) {
|
||||
CompilationInfo* info = job->info();
|
||||
Isolate* isolate = info->isolate();
|
||||
diff --git a/deps/v8/src/flag-definitions.h b/deps/v8/src/flag-definitions.h
|
||||
index e5ddbad..a3fb95c 100644
|
||||
--- a/deps/v8/src/flag-definitions.h
|
||||
+++ b/deps/v8/src/flag-definitions.h
|
||||
@@ -425,11 +425,11 @@ DEFINE_BOOL(omit_map_checks_for_leaf_maps, true,
|
||||
|
||||
// Flags for TurboFan.
|
||||
DEFINE_BOOL(turbo, false, "enable TurboFan compiler")
|
||||
DEFINE_IMPLICATION(turbo, turbo_asm_deoptimization)
|
||||
DEFINE_IMPLICATION(turbo, turbo_loop_peeling)
|
||||
-DEFINE_BOOL(turbo_from_bytecode, false, "enable building graphs from bytecode")
|
||||
+DEFINE_BOOL(turbo_from_bytecode, true, "enable building graphs from bytecode")
|
||||
DEFINE_BOOL(turbo_sp_frame_access, false,
|
||||
"use stack pointer-relative access to frame wherever possible")
|
||||
DEFINE_BOOL(turbo_preprocess_ranges, true,
|
||||
"run pre-register allocation heuristics")
|
||||
DEFINE_BOOL(turbo_loop_stackcheck, true, "enable stack checks in loops")
|
||||
@ -29,7 +29,10 @@
|
||||
"node.v6.5.0.patch"
|
||||
],
|
||||
"v7.0.0": {
|
||||
"commit": "92c1d9622bd9df3226aa833a9da6af9ef9ef5146",
|
||||
"patches": [ "node.v7.0.0.patch" ]
|
||||
"commit": "0c6455278da681d20fa8297f4a1c301cb78506f5",
|
||||
"patches": [
|
||||
"node.v7.0.0.patch",
|
||||
"ignition.patch"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user