diff --git a/xla/mlir_hlo/mhlo/transforms/materialize_broadcasts/materialize_broadcasts.cc b/xla/mlir_hlo/mhlo/transforms/materialize_broadcasts/materialize_broadcasts.cc index e92f5288c591e..ea23828e41076 100644 --- a/xla/mlir_hlo/mhlo/transforms/materialize_broadcasts/materialize_broadcasts.cc +++ b/xla/mlir_hlo/mhlo/transforms/materialize_broadcasts/materialize_broadcasts.cc @@ -72,16 +72,16 @@ struct ClampWithBroadcastConvert : public OpRewritePattern { } // namespace -void setupMaterializeBroadcastsLegality(MLIRContext * /*context*/, - ConversionTarget *conversionTarget) { +static void setupMaterializeBroadcastsLegality( + MLIRContext * /*context*/, ConversionTarget *conversionTarget) { conversionTarget->addDynamicallyLegalOp([](ClampOp op) { return op.getMax().getType() == op.getOperand().getType() && op.getMin().getType() == op.getOperand().getType(); }); } -void populateMaterializeBroadcastsPatterns(MLIRContext *context, - RewritePatternSet *patterns) { +static void populateMaterializeBroadcastsPatterns(MLIRContext *context, + RewritePatternSet *patterns) { // ClampOp. This op has a special case where it accepts either same-shaped // inputs or scalars (a restricted form of broadcasting). This makes the // broadcast explicit. diff --git a/xla/mlir_hlo/mhlo/transforms/materialize_broadcasts/materialize_broadcasts_pass.cc b/xla/mlir_hlo/mhlo/transforms/materialize_broadcasts/materialize_broadcasts_pass.cc index 0b5f8171be9c7..4ae7858f88b8d 100644 --- a/xla/mlir_hlo/mhlo/transforms/materialize_broadcasts/materialize_broadcasts_pass.cc +++ b/xla/mlir_hlo/mhlo/transforms/materialize_broadcasts/materialize_broadcasts_pass.cc @@ -59,7 +59,7 @@ struct TestMaterializeBroadcastsPass } // namespace -std::unique_ptr<::mlir::Pass> createTestMaterializeBroadcastsPass() { +static std::unique_ptr<::mlir::Pass> createTestMaterializeBroadcastsPass() { return std::make_unique(); }