Implement MLValue, statement operands, operation statement operands and values. ML functions now have full support for expressing operations. Induction variables, function arguments and return values are still todo.

PiperOrigin-RevId: 206253643
diff --git a/lib/IR/Function.cpp b/lib/IR/Function.cpp
index b06be4d..e598f2a 100644
--- a/lib/IR/Function.cpp
+++ b/lib/IR/Function.cpp
@@ -18,6 +18,7 @@
 #include "mlir/IR/CFGFunction.h"
 #include "mlir/IR/MLFunction.h"
 #include "mlir/IR/Module.h"
+#include "mlir/IR/StmtVisitor.h"
 #include "mlir/IR/Types.h"
 #include "llvm/ADT/StringRef.h"
 using namespace mlir;
@@ -120,6 +121,9 @@
     : Function(name, type, Kind::MLFunc), StmtBlock(StmtBlockKind::MLFunc) {}
 
 MLFunction::~MLFunction() {
-  // TODO: When move SSA stuff is supported.
-  // dropAllReferences();
+  struct DropReferencesPass : public StmtVisitor<DropReferencesPass> {
+    void visitOperationStmt(OperationStmt *stmt) { stmt->dropAllReferences(); }
+  };
+  DropReferencesPass pass;
+  pass.visit(this);
 }