From aaedd8b78864452731fe246eecce2fea3acc2bd8 Mon Sep 17 00:00:00 2001 From: Nico Hartmann Date: Thu, 3 Mar 2022 18:03:42 +0000 Subject: [PATCH] Revert "[turbofan] Enable --verify-simplified-lowering in debug" This reverts commit 23b178b5404377665bf144314bca4baa6831f68d. Reason for revert: Speculative revert due to https://ci.chromium.org/ui/p/chromium/builders/try/linux-rel/945522/overview Original change's description: > [turbofan] Enable --verify-simplified-lowering in debug > > Bug: v8:12619 > Change-Id: I3b9f82a21c9454ff37036e8abcf73862e38f1fc9 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3494243 > Reviewed-by: Tobias Tebbi > Auto-Submit: Nico Hartmann > Commit-Queue: Nico Hartmann > Cr-Commit-Position: refs/heads/main@{#79338} Bug: v8:12619 Change-Id: Ia879b53e1b0a07109f0420fdf954b110f45abf58 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497339 Auto-Submit: Nico Hartmann Commit-Queue: Rubber Stamper Bot-Commit: Rubber Stamper Cr-Commit-Position: refs/heads/main@{#79354} --- src/compiler/simplified-lowering-verifier.cc | 5 +--- src/compiler/simplified-lowering-verifier.h | 25 ++++---------------- src/flags/flag-definitions.h | 3 +-- 3 files changed, 7 insertions(+), 26 deletions(-) diff --git a/src/compiler/simplified-lowering-verifier.cc b/src/compiler/simplified-lowering-verifier.cc index 36e29d3805..d113a9f081 100644 --- a/src/compiler/simplified-lowering-verifier.cc +++ b/src/compiler/simplified-lowering-verifier.cc @@ -41,10 +41,7 @@ void SimplifiedLoweringVerifier::CheckAndSet(Node* node, const Type& type, node_type_str.str().c_str()); } } else { - // We store the type inferred by the verification pass. We do not update - // the node's type directly, because following phases might encounter - // unsound types as long as the verification is not complete. - SetType(node, type); + NodeProperties::SetType(node, type); } SetTruncation(node, GeneralizeTruncation(trunc, type)); } diff --git a/src/compiler/simplified-lowering-verifier.h b/src/compiler/simplified-lowering-verifier.h index e6af462f3a..ceff65dfdd 100644 --- a/src/compiler/simplified-lowering-verifier.h +++ b/src/compiler/simplified-lowering-verifier.h @@ -16,7 +16,6 @@ class OperationTyper; class SimplifiedLoweringVerifier final { public: struct PerNodeData { - Type type = Type::None(); Truncation truncation = Truncation::Any(IdentifyZeros::kDistinguishZeros); }; @@ -39,19 +38,6 @@ class SimplifiedLoweringVerifier final { return type_guards_.find(node) != type_guards_.end(); } - void ResizeDataIfNecessary(Node* node) { - if (data_.size() <= node->id()) { - data_.resize(node->id() + 1); - } - DCHECK_EQ(data_[node->id()].truncation, - Truncation::Any(IdentifyZeros::kDistinguishZeros)); - } - - void SetType(Node* node, const Type& type) { - ResizeDataIfNecessary(node); - data_[node->id()].type = type; - } - Type InputType(Node* node, int input_index) const { // TODO(nicohartmann): Check that inputs are typed, once all operators are // supported. @@ -59,16 +45,15 @@ class SimplifiedLoweringVerifier final { if (NodeProperties::IsTyped(input)) { return NodeProperties::GetType(input); } - // For nodes that have not been typed before SL, we use the type that has - // been inferred by the verifier. - if (input->id() < data_.size()) { - return data_[input->id()].type; - } return Type::None(); } void SetTruncation(Node* node, const Truncation& truncation) { - ResizeDataIfNecessary(node); + if (data_.size() <= node->id()) { + data_.resize(node->id() + 1); + } + DCHECK_EQ(data_[node->id()].truncation, + Truncation::Any(IdentifyZeros::kDistinguishZeros)); data_[node->id()].truncation = truncation; } diff --git a/src/flags/flag-definitions.h b/src/flags/flag-definitions.h index 6e81af41b5..ef5aa2dd2d 100644 --- a/src/flags/flag-definitions.h +++ b/src/flags/flag-definitions.h @@ -571,8 +571,7 @@ DEFINE_BOOL(assert_types, false, // TODO(tebbi): Support allocating types from background thread. DEFINE_NEG_IMPLICATION(assert_types, concurrent_recompilation) -// Enable verification of SimplifiedLowering in debug builds. -DEFINE_BOOL(verify_simplified_lowering, DEBUG_BOOL, +DEFINE_BOOL(verify_simplified_lowering, false, "verify graph generated by simplified lowering") DEFINE_BOOL(trace_compilation_dependencies, false, "trace code dependencies")