From 4569224be7c5479516f0f8546305ec8b02689974 Mon Sep 17 00:00:00 2001 From: Yilou Wang Date: Mon, 6 Apr 2026 01:18:55 +0200 Subject: [PATCH] add DFG switch --- src/V3Dfg.cpp | 5 ++++- src/V3DfgCse.cpp | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/V3Dfg.cpp b/src/V3Dfg.cpp index 76676790e..3f7e60ee3 100644 --- a/src/V3Dfg.cpp +++ b/src/V3Dfg.cpp @@ -692,7 +692,10 @@ void DfgVertex::typeCheck(const DfgGraph& dfg) const { } case VDfgType::SAnd: - case VDfgType::SOr: UASSERT_OBJ(false, this, "SAnd/SOr should be removed before DFG"); return; + case VDfgType::SOr: + case VDfgType::SThroughout: + UASSERT_OBJ(false, this, "SAnd/SOr/SThroughout should be removed before DFG"); + return; case VDfgType::LogAnd: case VDfgType::LogEq: diff --git a/src/V3DfgCse.cpp b/src/V3DfgCse.cpp index 0257c4117..b6149d9f1 100644 --- a/src/V3DfgCse.cpp +++ b/src/V3DfgCse.cpp @@ -126,6 +126,7 @@ class V3DfgCse final { case VDfgType::StreamR: case VDfgType::SAnd: case VDfgType::SOr: + case VDfgType::SThroughout: case VDfgType::Sub: case VDfgType::Xor: return V3Hash{}; } @@ -246,6 +247,7 @@ class V3DfgCse final { case VDfgType::StreamL: case VDfgType::SAnd: case VDfgType::SOr: + case VDfgType::SThroughout: case VDfgType::StreamR: case VDfgType::Sub: case VDfgType::Xor: return true;