Add static pass registration

Add static pass registration and change mlir-opt to use it. Future work is needed to refactor the registration for PassManager usage.

Change build targets to alwayslink to enforce registration.

PiperOrigin-RevId: 220390178
diff --git a/mlir/lib/Transforms/LoopFusion.cpp b/mlir/lib/Transforms/LoopFusion.cpp
index d9cdf9d..ae4647e 100644
--- a/mlir/lib/Transforms/LoopFusion.cpp
+++ b/mlir/lib/Transforms/LoopFusion.cpp
@@ -45,6 +45,7 @@
   LoopFusion() {}
 
   PassResult runOnMLFunction(MLFunction *f) override;
+  static char passID;
 };
 
 // LoopCollector walks the statements in an MLFunction and builds a map from
@@ -75,6 +76,8 @@
 
 } // end anonymous namespace
 
+char LoopFusion::passID = 0;
+
 FunctionPass *mlir::createLoopFusionPass() { return new LoopFusion; }
 
 // TODO(andydavis) Remove the following test code when more general loop
@@ -242,3 +245,5 @@
 
   return success();
 }
+
+static PassRegistration<LoopFusion> pass("loop-fusion", "Fuse loop nests");