From 3894484e0f6b3e8b09148d346045850e3ff7c129 Mon Sep 17 00:00:00 2001 From: Nandor Licker Date: Wed, 29 Nov 2023 07:31:52 -0800 Subject: [PATCH] [NFC][LowerSeqToSV] Use the module type instead of the slow module port getter --- lib/Conversion/SeqToSV/SeqToSV.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/Conversion/SeqToSV/SeqToSV.cpp b/lib/Conversion/SeqToSV/SeqToSV.cpp index bb7c1caaa95a..d9a8e12a425f 100644 --- a/lib/Conversion/SeqToSV/SeqToSV.cpp +++ b/lib/Conversion/SeqToSV/SeqToSV.cpp @@ -355,9 +355,10 @@ static bool isLegalType(Type ty) { static bool isLegalOp(Operation *op) { if (auto module = dyn_cast(op)) { - return llvm::all_of(module.getPortList(), [](hw::PortInfo port) { - return isLegalType(port.type); - }); + for (auto port : module.getHWModuleType().getPorts()) + if (!isLegalType(port.type)) + return false; + return true; } bool allOperandsLowered = llvm::all_of( op->getOperands(), [](auto op) { return isLegalType(op.getType()); });