Skip to content

Commit 071f72a

Browse files
authored
[mlir][Target][Cpp] Remove unused dialects (#85102)
Removes linking and registering dialects that are not support any more.
1 parent 3b5e7c8 commit 071f72a

File tree

4 files changed

+5
-13
lines changed

4 files changed

+5
-13
lines changed

mlir/lib/Target/Cpp/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ add_mlir_translation_library(MLIRTargetCpp
1010
MLIREmitCDialect
1111
MLIRFuncDialect
1212
MLIRIR
13-
MLIRMathDialect
14-
MLIRSCFDialect
1513
MLIRSupport
1614
MLIRTranslateLib
1715
)

mlir/lib/Target/Cpp/TranslateRegistration.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
#include "mlir/Dialect/ControlFlow/IR/ControlFlow.h"
1010
#include "mlir/Dialect/EmitC/IR/EmitC.h"
1111
#include "mlir/Dialect/Func/IR/FuncOps.h"
12-
#include "mlir/Dialect/Math/IR/Math.h"
13-
#include "mlir/Dialect/SCF/IR/SCF.h"
1412
#include "mlir/IR/BuiltinOps.h"
1513
#include "mlir/IR/Dialect.h"
1614
#include "mlir/Target/Cpp/CppEmitter.h"
@@ -42,9 +40,7 @@ void registerToCppTranslation() {
4240
// clang-format off
4341
registry.insert<cf::ControlFlowDialect,
4442
emitc::EmitCDialect,
45-
func::FuncDialect,
46-
math::MathDialect,
47-
scf::SCFDialect>();
43+
func::FuncDialect>();
4844
// clang-format on
4945
});
5046
}

mlir/test/Target/Cpp/invalid.mlir

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ func.func @multiple_blocks() {
1010

1111
// -----
1212

13-
func.func @unsupported_std_op(%arg0: f64) -> f64 {
14-
// expected-error@+1 {{'math.absf' op unable to find printer for op}}
15-
%0 = math.absf %arg0 : f64
16-
return %0 : f64
13+
func.func @unsupported_op(%arg0: i1) {
14+
// expected-error@+1 {{'cf.assert' op unable to find printer for op}}
15+
cf.assert %arg0, "assertion foo"
16+
return
1717
}
1818

1919
// -----

utils/bazel/llvm-project-overlay/mlir/BUILD.bazel

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1773,8 +1773,6 @@ cc_library(
17731773
":EmitCDialect",
17741774
":FuncDialect",
17751775
":IR",
1776-
":MathDialect",
1777-
":SCFDialect",
17781776
":Support",
17791777
":TranslateLib",
17801778
"//llvm:Support",

0 commit comments

Comments
 (0)