Remove IREE_REGISTER_MLIR_PASSES: re-registration is supported in MLIR for a long time now.
PiperOrigin-RevId: 328431650
diff --git a/bindings/python/CMakeLists.txt b/bindings/python/CMakeLists.txt
index 3f2fa84..3febc3b 100644
--- a/bindings/python/CMakeLists.txt
+++ b/bindings/python/CMakeLists.txt
@@ -16,6 +16,5 @@
set(PYBIND_COPTS "-fexceptions")
set(PYBIND_EXTENSION_COPTS "-fvisibility=hidden")
-set(PYBIND_REGISTER_MLIR_PASSES "-DIREE_REGISTER_MLIR_PASSES")
add_subdirectory(pyiree)
diff --git a/bindings/python/build_defs.oss.bzl b/bindings/python/build_defs.oss.bzl
index 040c003..7ad76b5 100644
--- a/bindings/python/build_defs.oss.bzl
+++ b/bindings/python/build_defs.oss.bzl
@@ -36,10 +36,6 @@
"-fvisibility=hidden",
]
-PYBIND_REGISTER_MLIR_PASSES = [
- "-DIREE_REGISTER_MLIR_PASSES",
-]
-
# Optional deps to enable an intree TensorFlow python. This build configuration
# defaults to getting TensorFlow from the python environment (empty).
INTREE_TENSORFLOW_PY_DEPS = []
diff --git a/bindings/python/pyiree/compiler/BUILD b/bindings/python/pyiree/compiler/BUILD
index 3fa9b4a..d8550d7 100644
--- a/bindings/python/pyiree/compiler/BUILD
+++ b/bindings/python/pyiree/compiler/BUILD
@@ -18,7 +18,6 @@
"PYBIND_COPTS",
"PYBIND_EXTENSION_COPTS",
"PYBIND_FEATURES",
- "PYBIND_REGISTER_MLIR_PASSES",
"PYTHON_CPP_EXTRA_DEPS",
"iree_py_extension",
"iree_py_library",
@@ -85,7 +84,6 @@
hdrs = [
"compiler.h",
],
- copts = PYBIND_REGISTER_MLIR_PASSES,
deps = COMPILER_DEPS + [
"//bindings/python/pyiree/common",
"//iree/tools:init_compiler_modules",
diff --git a/bindings/python/pyiree/compiler/CMakeLists.txt b/bindings/python/pyiree/compiler/CMakeLists.txt
index 929e621..d8ed6c1 100644
--- a/bindings/python/pyiree/compiler/CMakeLists.txt
+++ b/bindings/python/pyiree/compiler/CMakeLists.txt
@@ -43,8 +43,6 @@
"compiler.cc"
PYEXT_DEPS
bindings::python::pyiree::common::PyextCommonLib
- COPTS
- ${PYBIND_REGISTER_MLIR_PASSES}
DEPS
# Transforms. Adopted from the Bazel variable COMPILER::DEPS.
iree::compiler::Dialect::Flow::Transforms
diff --git a/bindings/python/pyiree/compiler/compiler.cc b/bindings/python/pyiree/compiler/compiler.cc
index 7910e4c..6c189f8 100644
--- a/bindings/python/pyiree/compiler/compiler.cc
+++ b/bindings/python/pyiree/compiler/compiler.cc
@@ -82,12 +82,9 @@
mlir::iree_compiler::registerHALTargetBackends();
mlir::iree_compiler::registerVMTargets();
- // Depending on the build environment the MLIR Passes may already be
- // registered. Conditionally register passes until re-registration is
- // supported.
-#ifdef IREE_REGISTER_MLIR_PASSES
+ // Register all MLIR Core passes.
mlir::registerMlirPasses();
-#endif
+
// Register IREE dialects.
mlir::iree_compiler::registerAllIreePasses();