Skip to content

Commit

Permalink
[NFC][LowerSeqToSV] Use the module type instead of the slow module po…
Browse files Browse the repository at this point in the history
…rt getter
  • Loading branch information
nandor committed Nov 29, 2023
1 parent 9d4156a commit 3894484
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/Conversion/SeqToSV/SeqToSV.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,9 +355,10 @@ static bool isLegalType(Type ty) {

static bool isLegalOp(Operation *op) {
if (auto module = dyn_cast<hw::HWModuleLike>(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()); });
Expand Down

0 comments on commit 3894484

Please sign in to comment.