18 #include "mlir/IR/BuiltinTypes.h"
19 #include "mlir/IR/OperationSupport.h"
21 using namespace circt;
22 using namespace calyx;
27 struct GoInsertionPass :
public GoInsertionBase<GoInsertionPass> {
28 void runOnOperation()
override;
33 void GoInsertionPass::runOnOperation() {
34 ComponentOp component = getOperation();
35 auto wiresOp = component.getWiresOp();
37 OpBuilder
builder(wiresOp->getRegion(0));
39 builder.create<UndefinedOp>(wiresOp->getLoc(),
builder.getI1Type());
41 wiresOp.walk([&](GroupOp group) {
42 OpBuilder
builder(group->getRegion(0));
45 auto goOp =
builder.create<GroupGoOp>(group->getLoc(), undefinedOp);
52 return std::make_unique<GoInsertionPass>();
static void updateGroupAssignmentGuards(OpBuilder &builder, GroupOp &group, Op &op)
Updates the guard of each assignment within a group with op.
std::unique_ptr< mlir::Pass > createGoInsertionPass()
This file defines an intermediate representation for circuits acting as an abstraction for constraint...