Revert "[compiler] Ship Ignition for all TurboFan code."
Breaks layout tests on Blink builders. TBR=machenbach@chromium.org Review-Url: https://chromiumcodereview.appspot.com/2428413004 Cr-Commit-Position: refs/heads/master@{#40471}
This commit is contained in:
parent
2b11a0b92d
commit
510b56d3f2
@ -2258,10 +2258,11 @@ MaybeLocal<Script> ScriptCompiler::Compile(Local<Context> context,
|
||||
source->info->set_script(script);
|
||||
|
||||
{
|
||||
// Create a canonical handle scope for compiling Ignition bytecode. This is
|
||||
// Create a canonical handle scope if compiling ignition bytecode. This is
|
||||
// required by the constant array builder to de-duplicate objects without
|
||||
// dereferencing handles.
|
||||
i::CanonicalHandleScope canonical(isolate);
|
||||
std::unique_ptr<i::CanonicalHandleScope> canonical;
|
||||
if (i::FLAG_ignition) canonical.reset(new i::CanonicalHandleScope(isolate));
|
||||
|
||||
// Do the parsing tasks which need to be done on the main thread. This will
|
||||
// also handle parse errors.
|
||||
|
@ -4061,7 +4061,7 @@ bool Genesis::InstallExtensions(Handle<Context> native_context,
|
||||
InstallExtension(isolate, "v8/statistics", &extension_states)) &&
|
||||
(!FLAG_expose_trigger_failure ||
|
||||
InstallExtension(isolate, "v8/trigger-failure", &extension_states)) &&
|
||||
(!FLAG_trace_ignition_dispatches ||
|
||||
(!(FLAG_ignition && FLAG_trace_ignition_dispatches) ||
|
||||
InstallExtension(isolate, "v8/ignition-statistics",
|
||||
&extension_states)) &&
|
||||
InstallRequestedExtensions(isolate, extensions, &extension_states);
|
||||
|
@ -151,10 +151,11 @@ bool CompilerDispatcherJob::FinalizeParsingOnMainThread() {
|
||||
parse_info_->set_shared_info(shared_);
|
||||
|
||||
{
|
||||
// Create a canonical handle scope for compiling Ignition bytecode. This
|
||||
// is required by the constant array builder to de-duplicate objects
|
||||
// without dereferencing handles.
|
||||
CanonicalHandleScope canonical(isolate_);
|
||||
// Create a canonical handle scope if compiling ignition bytecode. This is
|
||||
// required by the constant array builder to de-duplicate objects without
|
||||
// dereferencing handles.
|
||||
std::unique_ptr<CanonicalHandleScope> canonical;
|
||||
if (FLAG_ignition) canonical.reset(new CanonicalHandleScope(isolate_));
|
||||
|
||||
// Do the parsing tasks which need to be done on the main thread. This
|
||||
// will also handle parse errors.
|
||||
|
@ -252,10 +252,11 @@ void CompilationJob::RegisterWeakObjectsInOptimizedCode(Handle<Code> code) {
|
||||
namespace {
|
||||
|
||||
bool Parse(ParseInfo* info) {
|
||||
// Create a canonical handle scope for compiling Ignition bytecode. This is
|
||||
// Create a canonical handle scope if compiling ignition bytecode. This is
|
||||
// required by the constant array builder to de-duplicate objects without
|
||||
// dereferencing handles.
|
||||
CanonicalHandleScope canonical(info->isolate());
|
||||
std::unique_ptr<CanonicalHandleScope> canonical;
|
||||
if (FLAG_ignition) canonical.reset(new CanonicalHandleScope(info->isolate()));
|
||||
|
||||
return Parser::ParseStatic(info);
|
||||
}
|
||||
@ -313,34 +314,10 @@ void EnsureFeedbackMetadata(CompilationInfo* info) {
|
||||
info->literal()->feedback_vector_spec()));
|
||||
}
|
||||
|
||||
bool UseTurboFan(Handle<SharedFunctionInfo> shared) {
|
||||
bool optimization_disabled = shared->optimization_disabled();
|
||||
bool dont_crankshaft = shared->dont_crankshaft();
|
||||
|
||||
// Check the enabling conditions for Turbofan.
|
||||
// 1. "use asm" code.
|
||||
bool is_turbofanable_asm =
|
||||
FLAG_turbo_asm && shared->asm_function() && !optimization_disabled;
|
||||
|
||||
// 2. Fallback for features unsupported by Crankshaft.
|
||||
bool is_unsupported_by_crankshaft_but_turbofanable =
|
||||
dont_crankshaft && strcmp(FLAG_turbo_filter, "~~") == 0 &&
|
||||
!optimization_disabled;
|
||||
|
||||
// 3. Explicitly enabled by the command-line filter.
|
||||
bool passes_turbo_filter = shared->PassesFilter(FLAG_turbo_filter);
|
||||
|
||||
return is_turbofanable_asm || is_unsupported_by_crankshaft_but_turbofanable ||
|
||||
passes_turbo_filter;
|
||||
}
|
||||
|
||||
bool ShouldUseIgnition(CompilationInfo* info) {
|
||||
DCHECK(info->has_shared_info());
|
||||
if (!FLAG_ignition) return false;
|
||||
|
||||
// Skip Ignition for asm.js functions.
|
||||
if (info->shared_info()->asm_function()) {
|
||||
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).
|
||||
@ -348,11 +325,10 @@ bool ShouldUseIgnition(CompilationInfo* info) {
|
||||
return !info->shared_info()->HasBaselineCode();
|
||||
}
|
||||
|
||||
// Code destined for TurboFan should be compiled with Ignition first.
|
||||
if (UseTurboFan(info->shared_info())) return true;
|
||||
|
||||
// Only use Ignition for any other function if FLAG_ignition is true.
|
||||
if (!FLAG_ignition) return false;
|
||||
// Since we can't OSR from Ignition, skip Ignition for asm.js functions.
|
||||
if (info->shared_info()->asm_function()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Checks whether top level functions should be passed by the filter.
|
||||
if (info->shared_info()->is_toplevel()) {
|
||||
@ -516,10 +492,13 @@ void InsertCodeIntoOptimizedCodeMap(CompilationInfo* info) {
|
||||
}
|
||||
|
||||
bool Renumber(ParseInfo* parse_info) {
|
||||
// Create a canonical handle scope for compiling Ignition bytecode. This is
|
||||
// Create a canonical handle scope if compiling ignition bytecode. This is
|
||||
// required by the constant array builder to de-duplicate objects without
|
||||
// dereferencing handles.
|
||||
CanonicalHandleScope canonical(parse_info->isolate());
|
||||
std::unique_ptr<CanonicalHandleScope> canonical;
|
||||
if (FLAG_ignition) {
|
||||
canonical.reset(new CanonicalHandleScope(parse_info->isolate()));
|
||||
}
|
||||
|
||||
if (!AstNumbering::Renumber(parse_info->isolate(), parse_info->zone(),
|
||||
parse_info->literal())) {
|
||||
@ -539,6 +518,27 @@ bool Renumber(ParseInfo* parse_info) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool UseTurboFan(Handle<SharedFunctionInfo> shared) {
|
||||
bool optimization_disabled = shared->optimization_disabled();
|
||||
bool dont_crankshaft = shared->dont_crankshaft();
|
||||
|
||||
// Check the enabling conditions for Turbofan.
|
||||
// 1. "use asm" code.
|
||||
bool is_turbofanable_asm =
|
||||
FLAG_turbo_asm && shared->asm_function() && !optimization_disabled;
|
||||
|
||||
// 2. Fallback for features unsupported by Crankshaft.
|
||||
bool is_unsupported_by_crankshaft_but_turbofanable =
|
||||
dont_crankshaft && strcmp(FLAG_turbo_filter, "~~") == 0 &&
|
||||
!optimization_disabled;
|
||||
|
||||
// 3. Explicitly enabled by the command-line filter.
|
||||
bool passes_turbo_filter = shared->PassesFilter(FLAG_turbo_filter);
|
||||
|
||||
return is_turbofanable_asm || is_unsupported_by_crankshaft_but_turbofanable ||
|
||||
passes_turbo_filter;
|
||||
}
|
||||
|
||||
bool GetOptimizedCodeNow(CompilationJob* job) {
|
||||
CompilationInfo* info = job->info();
|
||||
Isolate* isolate = info->isolate();
|
||||
|
@ -2788,7 +2788,7 @@ int Shell::Main(int argc, char* argv[]) {
|
||||
RunShell(isolate);
|
||||
}
|
||||
|
||||
if (i::FLAG_trace_ignition_dispatches &&
|
||||
if (i::FLAG_ignition && i::FLAG_trace_ignition_dispatches &&
|
||||
i::FLAG_trace_ignition_dispatches_output_file != nullptr) {
|
||||
WriteIgnitionDispatchCountersFile(isolate);
|
||||
}
|
||||
|
@ -439,7 +439,7 @@ StackFrame::Type StackFrame::ComputeType(const StackFrameIteratorBase* iterator,
|
||||
if (!marker->IsSmi()) {
|
||||
if (maybe_function->IsSmi()) {
|
||||
return NONE;
|
||||
} else if (IsInterpreterFramePc(iterator->isolate(),
|
||||
} else if (FLAG_ignition && IsInterpreterFramePc(iterator->isolate(),
|
||||
*(state->pc_address))) {
|
||||
return INTERPRETED;
|
||||
} else {
|
||||
|
@ -1630,7 +1630,7 @@ class MarkCompactCollector::EvacuateVisitorBase
|
||||
DCHECK_OBJECT_SIZE(size);
|
||||
DCHECK(IsAligned(size, kPointerSize));
|
||||
heap_->CopyBlock(dst_addr, src_addr, size);
|
||||
if ((mode == kProfiled) && dst->IsBytecodeArray()) {
|
||||
if ((mode == kProfiled) && FLAG_ignition && dst->IsBytecodeArray()) {
|
||||
PROFILE(heap_->isolate(),
|
||||
CodeMoveEvent(AbstractCode::cast(src), dst_addr));
|
||||
}
|
||||
|
@ -242,8 +242,9 @@ SharedFunctionInfo* IC::GetSharedFunctionInfo() const {
|
||||
// corresponding to the frame.
|
||||
StackFrameIterator it(isolate());
|
||||
while (it.frame()->fp() != this->fp()) it.Advance();
|
||||
if (it.frame()->type() == StackFrame::STUB) {
|
||||
// We might need to advance over bytecode handler frame for Ignition.
|
||||
if (FLAG_ignition && it.frame()->type() == StackFrame::STUB) {
|
||||
// Advance over bytecode handler frame.
|
||||
// TODO(rmcilroy): Remove this once bytecode handlers don't need a frame.
|
||||
it.Advance();
|
||||
}
|
||||
JavaScriptFrame* frame = JavaScriptFrame::cast(it.frame());
|
||||
|
@ -2535,7 +2535,9 @@ bool Isolate::Init(Deserializer* des) {
|
||||
}
|
||||
load_stub_cache_->Initialize();
|
||||
store_stub_cache_->Initialize();
|
||||
if (FLAG_ignition || serializer_enabled()) {
|
||||
interpreter_->Initialize();
|
||||
}
|
||||
|
||||
heap_.NotifyDeserializationComplete();
|
||||
}
|
||||
|
@ -1484,6 +1484,8 @@ void Logger::LogCodeObjects() {
|
||||
}
|
||||
|
||||
void Logger::LogBytecodeHandlers() {
|
||||
if (!FLAG_ignition) return;
|
||||
|
||||
const interpreter::OperandScale kOperandScales[] = {
|
||||
#define VALUE(Name, _) interpreter::OperandScale::k##Name,
|
||||
OPERAND_SCALE_LIST(VALUE)
|
||||
|
@ -335,30 +335,20 @@
|
||||
|
||||
}], # 'arch == ppc64 and simulator_run == True'
|
||||
|
||||
##############################################################################
|
||||
['variant == turbofan', {
|
||||
|
||||
# TurboFan cpu profiler result is different.
|
||||
'test-cpu-profiler/CollectDeoptEvents': [FAIL],
|
||||
'test-cpu-profiler/DeoptAtFirstLevelInlinedSource': [FAIL],
|
||||
'test-cpu-profiler/DeoptAtSecondLevelInlinedSource': [FAIL],
|
||||
|
||||
}], # variant == turbofan
|
||||
|
||||
##############################################################################
|
||||
['variant == turbofan_opt', {
|
||||
# TODO(mythria,4680): Lack of code-ageing in interpreter.
|
||||
'test-heap/Regress169209': [FAIL],
|
||||
|
||||
# TODO(mythria,4680): Lack of code-ageing and/or lack of compilation cache
|
||||
# in interpreter.
|
||||
'test-heap/CompilationCacheCachingBehavior': [FAIL],
|
||||
|
||||
# TODO(mstarzinger): Triggers Ignition+TurboFan on everything now and makes
|
||||
# the stack traces within the profilers look different. Needs investigation.
|
||||
'test-api/SetFunctionEntryHook': [SKIP],
|
||||
'test-cpu-profiler/BoundFunctionCall': [FAIL],
|
||||
'test-cpu-profiler/CollectSampleAPI': [FAIL],
|
||||
'test-cpu-profiler/FunctionApplySample': [FAIL],
|
||||
'test-cpu-profiler/FunctionCallSample': [FAIL],
|
||||
'test-cpu-profiler/JsNativeJsRuntimeJsSample': [FAIL],
|
||||
'test-cpu-profiler/JsNativeJsSample': [FAIL],
|
||||
'test-cpu-profiler/JsNativeJsRuntimeJsSampleMultiple': [FAIL],
|
||||
'test-cpu-profiler/JsNative1JsNative2JsSample': [FAIL],
|
||||
'test-cpu-profiler/NativeMethodUninitializedIC': [FAIL],
|
||||
'test-cpu-profiler/NativeAccessorUninitializedIC': [FAIL],
|
||||
'test-profile-generator/LineNumber': [FAIL],
|
||||
'test-sampler-api/StackFramesConsistent': [FAIL],
|
||||
# BUG(5193): Flaky.
|
||||
'test-cpu-profiler/FunctionApplySample': [PASS, ['system == windows', SKIP]],
|
||||
}], # variant == turbofan_opt
|
||||
|
||||
##############################################################################
|
||||
@ -407,7 +397,7 @@
|
||||
}], # variant == ignition_staging
|
||||
|
||||
##############################################################################
|
||||
['variant == turbofan or variant == ignition_turbofan', {
|
||||
['variant == ignition_turbofan', {
|
||||
# TODO(rmcilroy,4680): Related to lack of code flushing. Check failed: !function->shared()->is_compiled() || function->IsOptimized().
|
||||
'test-heap/TestCodeFlushingPreAged': [FAIL],
|
||||
'test-heap/TestCodeFlushingIncrementalScavenge': [FAIL],
|
||||
@ -435,7 +425,7 @@
|
||||
|
||||
# BUG(5193): Flaky.
|
||||
'test-cpu-profiler/FunctionApplySample': [PASS, ['system == windows', SKIP]],
|
||||
}], # variant == turbofan or variant == ignition_turbofan
|
||||
}], # variant == ignition_turbofan
|
||||
|
||||
##############################################################################
|
||||
['variant != ignition and variant != ignition_staging and variant != ignition_turbofan', {
|
||||
|
@ -2657,7 +2657,7 @@ TEST(InstanceOfStubWriteBarrier) {
|
||||
namespace {
|
||||
|
||||
int GetProfilerTicks(SharedFunctionInfo* shared) {
|
||||
return FLAG_ignition || FLAG_turbo ? shared->profiler_ticks()
|
||||
return FLAG_ignition ? shared->profiler_ticks()
|
||||
: shared->code()->profiler_ticks();
|
||||
}
|
||||
|
||||
|
@ -14581,7 +14581,7 @@ void SetFunctionEntryHookTest::RunTest() {
|
||||
RunLoopInNewEnv(isolate);
|
||||
|
||||
// Check the expected invocation counts.
|
||||
if (!i::FLAG_ignition && !i::FLAG_turbo) {
|
||||
if (!i::FLAG_ignition) {
|
||||
CHECK_EQ(2, CountInvocations(NULL, "bar"));
|
||||
CHECK_EQ(200, CountInvocations("bar", "foo"));
|
||||
CHECK_EQ(200, CountInvocations(NULL, "foo"));
|
||||
@ -14822,8 +14822,7 @@ UNINITIALIZED_TEST(SetJitCodeEventHandler) {
|
||||
for (int i = 0; i < kIterations; ++i) {
|
||||
LocalContext env(isolate);
|
||||
i::AlwaysAllocateScope always_allocate(i_isolate);
|
||||
i::heap::SimulateFullSpace(i::FLAG_ignition || i::FLAG_turbo
|
||||
? heap->old_space()
|
||||
i::heap::SimulateFullSpace(i::FLAG_ignition ? heap->old_space()
|
||||
: heap->code_space());
|
||||
CompileRun(script);
|
||||
|
||||
@ -21805,7 +21804,7 @@ void TestStubCache(bool primary) {
|
||||
// The test does not work with interpreter because bytecode handlers taken
|
||||
// from the snapshot already refer to ICs with disabled counters and there
|
||||
// is no way to trigger bytecode handlers recompilation.
|
||||
if (i::FLAG_ignition || i::FLAG_turbo) return;
|
||||
if (i::FLAG_ignition) return;
|
||||
|
||||
i::FLAG_native_code_counters = true;
|
||||
if (primary) {
|
||||
|
@ -322,10 +322,9 @@ TEST(FeedbackVectorPreservedAcrossRecompiles) {
|
||||
// of the full code.
|
||||
CHECK(f->IsOptimized());
|
||||
// If the baseline code is bytecode, then it will not have deoptimization
|
||||
// support. The has_deoptimization_support() check is only required if the
|
||||
// support. has_deoptimization_support() check is only required if the
|
||||
// baseline code is from fullcodegen.
|
||||
CHECK(f->shared()->has_deoptimization_support() || i::FLAG_ignition ||
|
||||
i::FLAG_turbo);
|
||||
CHECK(f->shared()->has_deoptimization_support() || i::FLAG_ignition);
|
||||
object = f->feedback_vector()->Get(slot_for_a);
|
||||
CHECK(object->IsWeakCell() &&
|
||||
WeakCell::cast(object)->value()->IsJSFunction());
|
||||
|
@ -81,8 +81,9 @@ static void construct_call(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
||||
frame_iterator.Advance();
|
||||
CHECK(frame_iterator.frame()->is_construct());
|
||||
frame_iterator.Advance();
|
||||
if (frame_iterator.frame()->type() == i::StackFrame::STUB) {
|
||||
if (i::FLAG_ignition) {
|
||||
// Skip over bytecode handler frame.
|
||||
CHECK(frame_iterator.frame()->type() == i::StackFrame::STUB);
|
||||
frame_iterator.Advance();
|
||||
}
|
||||
i::StackFrame* calling_frame = frame_iterator.frame();
|
||||
|
@ -1678,7 +1678,7 @@ TEST(CodeSerializerInternalReference) {
|
||||
// In ignition there are only relative jumps, so the following code
|
||||
// would not have any internal references. This test is not relevant
|
||||
// for ignition.
|
||||
if (FLAG_ignition || FLAG_turbo) {
|
||||
if (FLAG_ignition) {
|
||||
return;
|
||||
}
|
||||
// Disable experimental natives that are loaded after deserialization.
|
||||
@ -1762,7 +1762,7 @@ TEST(CodeSerializerInternalReference) {
|
||||
}
|
||||
|
||||
TEST(CodeSerializerEagerCompilationAndPreAge) {
|
||||
if (FLAG_ignition || FLAG_turbo) return;
|
||||
if (FLAG_ignition) return;
|
||||
|
||||
FLAG_lazy = true;
|
||||
FLAG_serialize_toplevel = true;
|
||||
|
@ -59,10 +59,6 @@
|
||||
# not work, but we expect it to not crash.
|
||||
'debug-step-turbofan': [PASS, FAIL],
|
||||
|
||||
# Issue 4680: The eval'ed code is piped through Ignition and fails when being
|
||||
# live edited. This needs investigation.
|
||||
'debug-liveedit-double-call': [PASS, FAIL],
|
||||
|
||||
##############################################################################
|
||||
# Too slow in debug mode with --stress-opt mode.
|
||||
'regress/regress-2318': [PASS, ['mode == debug', SKIP]],
|
||||
@ -618,6 +614,14 @@
|
||||
'unicode-test': [SKIP],
|
||||
}], # variant == stress
|
||||
|
||||
##############################################################################
|
||||
['variant == turbofan', {
|
||||
|
||||
# Assumptions about optimization need investigation in TurboFan.
|
||||
'regress-sync-optimized-lists': [FAIL],
|
||||
|
||||
}], # variant == turbofan
|
||||
|
||||
##############################################################################
|
||||
['variant == turbofan_opt', {
|
||||
|
||||
@ -629,7 +633,6 @@
|
||||
'debug-evaluate-locals-optimized-double': [FAIL],
|
||||
'debug-liveedit-double-call': [FAIL],
|
||||
'es6/debug-evaluate-blockscopes': [FAIL],
|
||||
'ignition/debug-break-on-stack': [FAIL],
|
||||
|
||||
# TODO(jgruber): Fails in --turbo --always-opt mode.
|
||||
'regress/regress-105': [FAIL],
|
||||
|
@ -3,7 +3,7 @@
|
||||
// found in the LICENSE file.
|
||||
|
||||
// TODO (mtrofin): re-enable ignition (v8:5345)
|
||||
// Flags: --no-turbo --no-ignition --no-ignition-staging
|
||||
// Flags: --no-ignition --no-ignition-staging
|
||||
// Flags: --expose-wasm --expose-gc --allow-natives-syntax
|
||||
|
||||
load("test/mjsunit/wasm/wasm-constants.js");
|
||||
|
Loading…
Reference in New Issue
Block a user