diff --git a/lib/Conversion/ExportVerilog/PruneZeroValuedLogic.cpp b/lib/Conversion/ExportVerilog/PruneZeroValuedLogic.cpp index b72aea9707..ecc6e55591 100644 --- a/lib/Conversion/ExportVerilog/PruneZeroValuedLogic.cpp +++ b/lib/Conversion/ExportVerilog/PruneZeroValuedLogic.cpp @@ -40,13 +40,6 @@ static bool noI0TypedValue(ValueRange values) { return noI0Type(values.getTypes()); } -static SmallVector removeI0Typed(ValueRange values) { - SmallVector result; - llvm::copy_if(values, std::back_inserter(result), - [](Value value) { return !isZeroWidthLogic(value.getType()); }); - return result; -} - namespace { class PruneTypeConverter : public mlir::TypeConverter { diff --git a/lib/Conversion/HandshakeToHW/HandshakeToHW.cpp b/lib/Conversion/HandshakeToHW/HandshakeToHW.cpp index 6b0efa376c..ddfa105576 100644 --- a/lib/Conversion/HandshakeToHW/HandshakeToHW.cpp +++ b/lib/Conversion/HandshakeToHW/HandshakeToHW.cpp @@ -407,21 +407,6 @@ static ModulePortInfo getPortInfoForOp(OpBuilder &builder, Operation *op) { op->getResultTypes()); } -// Returns the in- and out types associated with a given handshake.extmemory -// operation. This defines the set of types associated with any given memref -// (which much be referenced by a single extmemory operation). -static ModulePortInfo getMemrefType(ConversionPatternRewriter &rewriter, - ExternalMemoryOp extmemOp) { - // Get a handle to the submodule which will wrap the external memory - auto extmemPortInfo = getPortInfoForOp(rewriter, extmemOp); - - // Drop the first port info; this one will be a handshake associated with the - // memref type. - extmemPortInfo.inputs.erase(extmemPortInfo.inputs.begin()); - - return extmemPortInfo; -} - static llvm::SmallVector portToFieldInfo(llvm::ArrayRef portInfo) { llvm::SmallVector fieldInfo; @@ -434,7 +419,6 @@ portToFieldInfo(llvm::ArrayRef portInfo) { // Convert any handshake.extmemory operations and the top-level I/O // associated with these. static LogicalResult convertExtMemoryOps(HWModuleOp mod) { - ModuleOp parentModule = mod->getParentOfType(); auto ports = mod.getPorts(); auto *ctx = mod.getContext(); @@ -462,7 +446,6 @@ static LogicalResult convertExtMemoryOps(HWModuleOp mod) { for (auto [i, arg] : memrefPorts) { // Insert ports into the module - hw::StructType ins, outs; auto memName = mod.getArgNames()[i].cast(); // Get the attached extmemory external module. diff --git a/lib/Dialect/Handshake/Transforms/Buffers.cpp b/lib/Dialect/Handshake/Transforms/Buffers.cpp index 1dcd29d8f8..ee5ec210bd 100644 --- a/lib/Dialect/Handshake/Transforms/Buffers.cpp +++ b/lib/Dialect/Handshake/Transforms/Buffers.cpp @@ -80,7 +80,7 @@ static void bufferResults(OpBuilder &builder, Operation *op, unsigned numSlots, continue; insertBuffer(op->getLoc(), res, builder, numSlots, bufferType); } -}; +} // Add a buffer to any un-buffered channel. static void bufferAllStrategy(Region &r, OpBuilder &builder, unsigned numSlots,