19 #include "mlir/Transforms/DialectConversion.h"
21 #include "mlir/Pass/Pass.h"
23 using namespace circt;
27 #define GEN_PASS_DEF_PREPAREFORFORMAL
28 #include "circt/Dialect/Verif/Passes.h.inc"
33 using namespace verif;
45 matchAndRewrite(hw::WireOp wire, OpAdaptor adaptor,
46 ConversionPatternRewriter &rewriter)
const override {
47 rewriter.replaceOp(wire, adaptor.getInput());
53 struct PrepareForFormalPass
54 : circt::verif::impl::PrepareForFormalBase<PrepareForFormalPass> {
55 void runOnOperation()
override;
59 void PrepareForFormalPass::runOnOperation() {
61 ConversionTarget target(getContext());
62 target.addLegalDialect<hw::HWDialect>();
63 target.addIllegalOp<hw::WireOp>();
66 RewritePatternSet
patterns(&getContext());
71 applyPartialConversion(getOperation(), target, std::move(
patterns))))
72 return signalPassFailure();
76 return std::make_unique<PrepareForFormalPass>();
std::unique_ptr< mlir::Pass > createPrepareForFormalPass()
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.