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/lib/IR/Builders.cpp b/lib/IR/Builders.cpp
index dc5b8e2..d5b85cc 100644
--- a/lib/IR/Builders.cpp
+++ b/lib/IR/Builders.cpp
@@ -141,7 +141,19 @@
 }
 
 //===----------------------------------------------------------------------===//
-// Statements
+// CFG function elements.
+//===----------------------------------------------------------------------===//
+
+// Basic block.
+BasicBlock *CFGFuncBuilder::createBlock() {
+  BasicBlock *b = new BasicBlock();
+  function->push_back(b);
+  setInsertionPoint(b);
+  return b;
+}
+
+//===----------------------------------------------------------------------===//
+// Statements.
 //===----------------------------------------------------------------------===//
 
 ForStmt *MLFuncBuilder::createFor(AffineConstantExpr *lowerBound,
@@ -149,7 +161,7 @@
                                   AffineConstantExpr *step) {
   if (!step)
     step = getConstantExpr(1);
-  auto stmt = new ForStmt(lowerBound, upperBound, step);
+  auto *stmt = new ForStmt(lowerBound, upperBound, step);
   block->getStatements().push_back(stmt);
   return stmt;
 }