Scaffolding for convertToCFG pass that replaces all instances of ML functions with equivalent CFG functions. Traverses module MLIR, generates CFG functions (empty for now) and removes ML functions. Adds Transforms library and tests.
PiperOrigin-RevId: 205848367
diff --git a/include/mlir/IR/Builders.h b/include/mlir/IR/Builders.h
index 12b8aed..e6e4e4d 100644
--- a/include/mlir/IR/Builders.h
+++ b/include/mlir/IR/Builders.h
@@ -123,6 +123,10 @@
insertPoint = block->end();
}
+ // Add new basic block and set the insertion point to the end of it.
+ BasicBlock *createBlock();
+
+ // Instructions.
OperationInst *createOperation(Identifier name, ArrayRef<CFGValue *> operands,
ArrayRef<Type *> resultTypes,
ArrayRef<NamedAttribute> attributes) {