Purge mlir/hlo from "alwayslink" annotations (NFC)

It isn't clear why these were added in the first place. We don't have any equivalent in the
cmake builds right now: so everything should work identically.

PiperOrigin-RevId: 403508648
Change-Id: Ib8fe2cba593266ee811903bb3b58a79fa25b0044
diff --git a/tensorflow/compiler/mlir/hlo/BUILD b/tensorflow/compiler/mlir/hlo/BUILD
index e6c5caa..3cb3a5e 100644
--- a/tensorflow/compiler/mlir/hlo/BUILD
+++ b/tensorflow/compiler/mlir/hlo/BUILD
@@ -457,6 +457,7 @@
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:Support",
     ],
+    alwayslink = 1,
 )
 
 gentbl_cc_library(
@@ -589,6 +590,7 @@
         "@llvm-project//mlir:TransformUtils",
         "@llvm-project//mlir:Transforms",
     ],
+    alwayslink = 1,
 )
 
 cc_library(
@@ -627,6 +629,7 @@
         "@llvm-project//mlir:Transforms",
         "@llvm-project//mlir:ViewLikeInterface",
     ],
+    alwayslink = 1,
 )
 
 cc_library(
@@ -665,6 +668,7 @@
         "@llvm-project//mlir:Transforms",
         "@llvm-project//mlir:ViewLikeInterface",
     ],
+    alwayslink = 1,
 )
 
 gentbl_cc_library(
@@ -735,6 +739,7 @@
         "@llvm-project//mlir:Transforms",
         "@llvm-project//mlir:ViewLikeInterface",
     ],
+    alwayslink = 1,
 )
 
 cc_library(
@@ -753,6 +758,7 @@
         "@llvm-project//mlir:TensorDialect",
         "@llvm-project//mlir:Transforms",
     ],
+    alwayslink = 1,
 )
 
 cc_library(
@@ -760,6 +766,7 @@
     srcs = ["lib/Dialect/mhlo/transforms/ral_lower_to_library_call.cc"],
     hdrs = [
         "include/mlir-hlo/Dialect/mhlo/transforms/passes.h",
+        "include/mlir-hlo/Dialect/mhlo/transforms/rewriters.h",
     ],
     deps = [
         ":disc_ral",
@@ -775,6 +782,7 @@
         "@llvm-project//mlir:TensorTransforms",
         "@llvm-project//mlir:Transforms",
     ],
+    alwayslink = 1,
 )
 
 cc_library(
@@ -782,10 +790,10 @@
     srcs = ["lib/Dialect/mhlo/transforms/ral_legalize_to_llvm.cc"],
     hdrs = [
         "include/mlir-hlo/Dialect/mhlo/transforms/passes.h",
+        "include/mlir-hlo/Dialect/mhlo/transforms/rewriters.h",
     ],
     deps = [
         ":disc_ral",
-        ":mhlo_to_mhlo_lowering_patterns",
         ":pass_details",
         "@llvm-project//llvm:Support",
         "@llvm-project//llvm:TransformUtils",
@@ -811,6 +819,7 @@
         "@llvm-project//mlir:ToLLVMIRTranslation",
         "@llvm-project//mlir:Transforms",
     ],
+    alwayslink = 1,
 )
 
 cc_library(
@@ -843,6 +852,7 @@
         "@llvm-project//mlir:Support",
         "@llvm-project//mlir:Transforms",
     ],
+    alwayslink = 1,
 )
 
 cc_library(
@@ -937,6 +947,7 @@
         "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:TransformUtils",
     ],
+    alwayslink = 1,
 )
 
 cc_library(
@@ -955,6 +966,7 @@
         "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Transforms",
     ],
+    alwayslink = 1,
 )
 
 cc_library(
@@ -1046,6 +1058,7 @@
         "@llvm-project//mlir:Support",
         "@llvm-project//mlir:Transforms",
     ],
+    alwayslink = 1,
 )
 
 cc_library(
@@ -1067,6 +1080,7 @@
         "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Transforms",
     ],
+    alwayslink = 1,
 )
 
 cc_library(
@@ -1097,6 +1111,7 @@
         "@llvm-project//mlir:TensorDialect",
         "@llvm-project//mlir:Transforms",
     ],
+    alwayslink = 1,
 )
 
 cc_library(
@@ -1120,6 +1135,7 @@
         "@llvm-project//mlir:TensorDialect",
         "@llvm-project//mlir:Transforms",
     ],
+    alwayslink = 1,
 )
 
 cc_library(
@@ -1142,6 +1158,7 @@
         "@llvm-project//mlir:TensorDialect",
         "@llvm-project//mlir:Transforms",
     ],
+    alwayslink = 1,
 )
 
 cc_library(
@@ -1164,6 +1181,7 @@
         "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Transforms",
     ],
+    alwayslink = 1,
 )
 
 cc_library(
@@ -1186,6 +1204,7 @@
         "@llvm-project//mlir:TransformUtils",
         "@llvm-project//mlir:ViewLikeInterface",
     ],
+    alwayslink = 1,
 )
 
 cc_library(
@@ -1225,6 +1244,7 @@
         "@llvm-project//mlir:TensorDialect",
         "@llvm-project//mlir:Transforms",
     ],
+    alwayslink = 1,
 )
 
 cc_library(
@@ -1251,6 +1271,7 @@
         "@llvm-project//mlir:TensorDialect",
         "@llvm-project//mlir:Transforms",
     ],
+    alwayslink = 1,
 )
 
 cc_library(
@@ -1261,6 +1282,7 @@
     deps = [
         "@llvm-project//llvm:Support",
     ],
+    alwayslink = 1,
 )
 
 tf_cc_test(
@@ -1289,6 +1311,7 @@
         "@llvm-project//mlir:Support",
         "@llvm-project//mlir:TransformUtils",
     ],
+    alwayslink = 1,
 )
 
 gentbl_cc_library(
@@ -1325,6 +1348,7 @@
         "@llvm-project//mlir:Support",
         "@llvm-project//mlir:TensorDialect",
     ],
+    alwayslink = 1,
 )
 
 cc_library(
@@ -1345,6 +1369,7 @@
         "@llvm-project//mlir:Support",
         "@llvm-project//mlir:TransformUtils",
     ],
+    alwayslink = 1,
 )
 
 cc_library(
@@ -1364,6 +1389,7 @@
         "@llvm-project//mlir:Support",
         "@llvm-project//mlir:Transforms",
     ],
+    alwayslink = 1,
 )
 
 cc_library(
@@ -1383,6 +1409,7 @@
         "@llvm-project//mlir:Support",
         "@llvm-project//mlir:Transforms",
     ],
+    alwayslink = 1,
 )
 
 cc_library(
@@ -1403,6 +1430,7 @@
         "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Transforms",
     ],
+    alwayslink = 1,
 )
 
 gentbl_cc_library(
@@ -1447,6 +1475,7 @@
         "@llvm-project//mlir:Support",
         "@llvm-project//mlir:Transforms",
     ],
+    alwayslink = 1,
 )
 
 cc_library(
@@ -1539,6 +1568,7 @@
         "@llvm-project//mlir:Support",
         "@llvm-project//mlir:TransformUtils",
     ],
+    alwayslink = 1,
 )
 
 cc_library(
@@ -1549,6 +1579,7 @@
         ":pass_details",
         "@llvm-project//mlir:Pass",
     ],
+    alwayslink = 1,
 )
 
 cc_library(
@@ -1635,7 +1666,6 @@
         ":hlo",
         ":lhlo",
         ":materialize_broadcasts",  # build-cleaner: keep
-        ":mhlo_to_mhlo_lowering_patterns",
         ":pass_details",
         ":shape_component_analysis",
         ":transforms_pass_details",
@@ -1655,6 +1685,7 @@
         "@llvm-project//mlir:TensorDialect",
         "@llvm-project//mlir:Transforms",
     ],
+    alwayslink = 1,
 )
 
 cc_library(
diff --git a/tensorflow/compiler/mlir/tools/kernel_gen/transforms/BUILD b/tensorflow/compiler/mlir/tools/kernel_gen/transforms/BUILD
index bae16a6..026e6bb 100644
--- a/tensorflow/compiler/mlir/tools/kernel_gen/transforms/BUILD
+++ b/tensorflow/compiler/mlir/tools/kernel_gen/transforms/BUILD
@@ -175,8 +175,8 @@
         "@llvm-project//mlir:VectorOps",
         "@llvm-project//mlir:VectorToLLVM",
         "//tensorflow/compiler/mlir/hlo",
-        "//tensorflow/compiler/mlir/hlo:lhlo",
         "//tensorflow/compiler/mlir/hlo:hlo_legalize_to_memref",
+        "//tensorflow/compiler/mlir/hlo:lhlo",
         "//tensorflow/compiler/mlir/hlo:type_conversion",
         "//tensorflow/compiler/mlir/tensorflow",
         "//tensorflow/compiler/mlir/tools/kernel_gen/ir:tf_framework_ops",