From b6426b4e76fe904bbe2101def9f5e9b4985a4a5d Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Fri, 9 Aug 2024 17:13:52 -0500 Subject: [PATCH 1/4] LLVM bump to include upstream verifier performance fix. https://github.com/llvm/llvm-project/compare/5689cccead7b70d8eeae4c641e8078e6d3c50b9a...c69b8c445a6b7efd29e67b665adaf04575f3ed92 --- llvm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm b/llvm index 5689cccead7b..c69b8c445a6b 160000 --- a/llvm +++ b/llvm @@ -1 +1 @@ -Subproject commit 5689cccead7b70d8eeae4c641e8078e6d3c50b9a +Subproject commit c69b8c445a6b7efd29e67b665adaf04575f3ed92 From 5576dec8339e949fb11f369cfc9d058c3fb02a3a Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Fri, 9 Aug 2024 17:49:07 -0500 Subject: [PATCH 2/4] [HW] Qualify types for safer use in other dialects. --- include/circt/Dialect/HW/HWTypes.td | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/circt/Dialect/HW/HWTypes.td b/include/circt/Dialect/HW/HWTypes.td index f2f8c1c8bceb..ee9ea25818f2 100644 --- a/include/circt/Dialect/HW/HWTypes.td +++ b/include/circt/Dialect/HW/HWTypes.td @@ -39,11 +39,11 @@ def HWNonInOutType : DialectType($_self)">, - "InOutType", "InOutType">; + "InOutType", "::circt::hw::InOutType">; class InOutTypeOf allowedTypes> : ContainerType, CPred<"::circt::hw::type_isa<::circt::hw::InOutType>($_self)">, - "::circt::hw::type_cast<::circt::hw::InOutType>($_self).getElementType()", "InOutType">; + "::circt::hw::type_cast<::circt::hw::InOutType>($_self).getElementType()", "::circt::hw::InOutType">; // A handle to refer to circt::hw::ArrayType in ODS. def ArrayType : DialectType($_self)">, - "a UnionType", "::circt::hw::TypeAliasOr">; + "a UnionType", "::circt::hw::TypeAliasOr<::circt::hw::UnionType>">; // A handle to refer to circt::hw::EnumType in ODS. def EnumType : DialectType Date: Fri, 9 Aug 2024 17:52:58 -0500 Subject: [PATCH 3/4] [ImportVerilog] Fix ternary with diff types, both become Value. --- lib/Conversion/ImportVerilog/Expressions.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Conversion/ImportVerilog/Expressions.cpp b/lib/Conversion/ImportVerilog/Expressions.cpp index b9e26c8590ca..dc8b370129c7 100644 --- a/lib/Conversion/ImportVerilog/Expressions.cpp +++ b/lib/Conversion/ImportVerilog/Expressions.cpp @@ -178,7 +178,9 @@ struct RvalueExprVisitor { isInc ? builder.create(loc, preValue, one).getResult() : builder.create(loc, preValue, one).getResult(); builder.create(loc, arg, postValue); - return isPost ? preValue : postValue; + if (isPost) + return preValue; + return postValue; } // Handle unary operators. From 4a2fb51ac99fae968f513cf1a81e934ef203c3a4 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Fri, 9 Aug 2024 18:02:14 -0500 Subject: [PATCH 4/4] [HW] Whoops, don't qualify the pretty name. Caught by test! --- include/circt/Dialect/HW/HWTypes.td | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/circt/Dialect/HW/HWTypes.td b/include/circt/Dialect/HW/HWTypes.td index ee9ea25818f2..431ed6c34857 100644 --- a/include/circt/Dialect/HW/HWTypes.td +++ b/include/circt/Dialect/HW/HWTypes.td @@ -43,7 +43,7 @@ def InOutType : DialectType allowedTypes> : ContainerType, CPred<"::circt::hw::type_isa<::circt::hw::InOutType>($_self)">, - "::circt::hw::type_cast<::circt::hw::InOutType>($_self).getElementType()", "::circt::hw::InOutType">; + "::circt::hw::type_cast<::circt::hw::InOutType>($_self).getElementType()", "InOutType">; // A handle to refer to circt::hw::ArrayType in ODS. def ArrayType : DialectType