Commit a9345a15 authored by ishell's avatar ishell Committed by Commit bot

Revert of [turbofan] Add --csa-verify flag that enables machine graph...

Revert of [turbofan] Add --csa-verify flag that enables machine graph verification of code stubs. (patchset #2 id:60001 of https://codereview.chromium.org/2551933002/ )

Reason for revert:
Broke nosnap build: https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20nosnap%20-%20debug/builds/10689

Original issue's description:
> [turbofan] Add --csa-verify flag that enables machine graph verification of code stubs.
>
> The flag must be used only by CodeStubAssemblerGraphsCorrectness cctest for now
> and once all the verification issues are fixed the flag will be enabled in debug
> mode by default.
>
> BUG=
>
> Committed: https://crrev.com/292b3548f6d02b964b4afe3e05f89c0681fa5620
> Cr-Commit-Position: refs/heads/master@{#41531}

TBR=mstarzinger@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review-Url: https://codereview.chromium.org/2552893003
Cr-Commit-Position: refs/heads/master@{#41532}
parent 292b3548
......@@ -1762,15 +1762,10 @@ bool PipelineImpl::ScheduleAndSelectInstructions(Linkage* linkage,
info(), data->graph(), data->schedule()));
}
// TODO(ishell): Always enable graph verification of stubs in debug mode
// once all the issues are fixed.
bool verify_stub_graph =
DEBUG_BOOL && FLAG_csa_verify && data->info()->IsStub();
if (verify_stub_graph || (FLAG_turbo_verify_machine_graph != nullptr &&
if (FLAG_turbo_verify_machine_graph != nullptr &&
(!strcmp(FLAG_turbo_verify_machine_graph, "*") ||
!strcmp(FLAG_turbo_verify_machine_graph,
data->info()->GetDebugName().get())))) {
data->info()->GetDebugName().get()))) {
Zone temp_zone(data->isolate()->allocator(), ZONE_NAME);
MachineGraphVerifier::Run(data->graph(), data->schedule(), linkage,
&temp_zone);
......
......@@ -444,7 +444,6 @@ DEFINE_BOOL(turbo_asm_deoptimization, false,
DEFINE_BOOL(turbo_verify, DEBUG_BOOL, "verify TurboFan graphs at each phase")
DEFINE_STRING(turbo_verify_machine_graph, nullptr,
"verify TurboFan machine graph before instruction selection")
DEFINE_BOOL(csa_verify, false, "verify TurboFan machine graph of code stubs")
DEFINE_BOOL(turbo_stats, false, "print TurboFan statistics")
DEFINE_BOOL(turbo_stats_nvp, false,
"print TurboFan statistics in machine-readable format")
......
......@@ -1927,44 +1927,5 @@ TEST(BuildAppendJSArrayFastDoubleElementsObject) {
isolate->heap()->undefined_value(), Smi::FromInt(6), 6, 4);
}
TEST(CodeStubAssemblerGraphsCorrectness) {
// The test does not work with interpreter because bytecode handlers taken
// from the snapshot already refer to precompiled stubs from the snapshot
// and there is no way to trigger bytecode handlers recompilation.
if (i::FLAG_ignition || i::FLAG_turbo) return;
i::FLAG_csa_verify = true;
v8::Isolate::CreateParams create_params;
create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
v8::Isolate* isolate = v8::Isolate::New(create_params);
i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
{
v8::Isolate::Scope isolate_scope(isolate);
LocalContext env(isolate);
v8::HandleScope scope(isolate);
{
// Enforce recompilation of the following stubs.
i::CodeStub::Major code_stub_keys[] = {
i::CodeStub::LoadIC, i::CodeStub::LoadICTrampoline,
i::CodeStub::LoadGlobalIC, i::CodeStub::LoadGlobalICTrampoline,
i::CodeStub::KeyedLoadICTF, i::CodeStub::KeyedLoadICTrampolineTF,
i::CodeStub::StoreIC, i::CodeStub::StoreICTrampoline,
i::CodeStub::KeyedStoreICTF, i::CodeStub::KeyedStoreICTrampolineTF,
};
i::Heap* heap = i_isolate->heap();
i::Handle<i::UnseededNumberDictionary> dict(heap->code_stubs());
for (size_t i = 0; i < arraysize(code_stub_keys); i++) {
dict = i::UnseededNumberDictionary::DeleteKey(dict, code_stub_keys[i]);
}
heap->SetRootCodeStubs(*dict);
}
// Generate some stubs here.
}
isolate->Dispose();
}
} // namespace internal
} // namespace v8
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment