Skip to content

Commit 6b208c4

Browse files
🚛 Move mapping pass files to QCO/Transforms (#1547)
## Description This pull request moves the recently added mapping pass `.cpp` and `.h` files to `QCO/Transforms/Mapping` and adjusts the respective `CMakeLists.txt` files accordingly. ## Checklist: <!--- This checklist serves as a reminder of a couple of things that ensure your pull request will be merged swiftly. --> - [x] The pull request only contains commits that are focused and relevant to this change. - [x] I have added appropriate tests that cover the new/changed functionality. - [x] I have updated the documentation to reflect these changes. - [x] I have added entries to the changelog for any noteworthy additions, changes, fixes, or removals. - [x] I have added migration instructions to the upgrade guide (if needed). - [x] The changes follow the project's style guidelines and introduce no new warnings. - [x] The changes are fully tested and pass the CI checks. - [x] I have reviewed my own code changes.
1 parent d8f551d commit 6b208c4

17 files changed

Lines changed: 31 additions & 21 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This project adheres to [Semantic Versioning], with the exception that minor rel
1212
### Added
1313

1414
- ✨ Add conversions between Jeff and QCO ([#1479]) ([**@denialhaag**])
15-
- ✨ Add a `place-and-route` pass for mapping circuits to architectures with restricted topologies ([#1537]) ([**@MatthiasReumann**])
15+
- ✨ Add a `place-and-route` pass for mapping circuits to architectures with restricted topologies ([#1537], [#1547]) ([**@MatthiasReumann**])
1616
- ✨ Add initial infrastructure for new QC and QCO MLIR dialects
1717
([#1264], [#1330], [#1402], [#1428], [#1430], [#1436], [#1443], [#1446], [#1464], [#1465], [#1470], [#1471], [#1472], [#1474], [#1475], [#1506], [#1510], [#1513], [#1521])
1818
([**@burgholzer**], [**@denialhaag**], [**@taminob**], [**@DRovara**], [**@li-mingbao**], [**@Ectras**], [**@MatthiasReumann**])
@@ -329,6 +329,7 @@ _📚 Refer to the [GitHub Release Notes](https://github.com/munich-quantum-tool
329329

330330
<!-- PR links -->
331331

332+
[#1547]: https://github.com/munich-quantum-toolkit/core/pull/1547
332333
[#1537]: https://github.com/munich-quantum-toolkit/core/pull/1537
333334
[#1521]: https://github.com/munich-quantum-toolkit/core/pull/1521
334335
[#1513]: https://github.com/munich-quantum-toolkit/core/pull/1513

mlir/include/mlir/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@
88

99
add_subdirectory(Conversion)
1010
add_subdirectory(Dialect)
11-
add_subdirectory(Passes)

mlir/include/mlir/Dialect/QCO/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@
77
# Licensed under the MIT License
88

99
add_subdirectory(IR)
10+
add_subdirectory(Transforms)

mlir/include/mlir/Passes/CMakeLists.txt renamed to mlir/include/mlir/Dialect/QCO/Transforms/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88

99
set(LLVM_TARGET_DEFINITIONS Passes.td)
1010
mlir_tablegen(Passes.h.inc -gen-pass-decls -name QCO)
11-
add_public_tablegen_target(QcoPassesIncGen)
12-
add_mlir_doc(Passes QcoPasses Passes/ -gen-pass-doc)
11+
add_public_tablegen_target(MLIRQCOTransformsIncGen)
12+
add_mlir_doc(Passes MLIRQCOTransforms Passes/ -gen-pass-doc)

mlir/include/mlir/Passes/Mapping/Architecture.h renamed to mlir/include/mlir/Dialect/QCO/Transforms/Mapping/Architecture.h

File renamed without changes.

mlir/include/mlir/Passes/Passes.h renamed to mlir/include/mlir/Dialect/QCO/Transforms/Passes.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@
1919
namespace mlir::qco {
2020

2121
#define GEN_PASS_DECL
22-
#include "mlir/Passes/Passes.h.inc" // IWYU pragma: export
22+
#include "mlir/Dialect/QCO/Transforms/Passes.h.inc" // IWYU pragma: export
2323

2424
//===----------------------------------------------------------------------===//
2525
// Registration
2626
//===----------------------------------------------------------------------===//
2727

2828
/// Generate the code for registering passes.
2929
#define GEN_PASS_REGISTRATION
30-
#include "mlir/Passes/Passes.h.inc" // IWYU pragma: export
30+
#include "mlir/Dialect/QCO/Transforms/Passes.h.inc" // IWYU pragma: export
3131

3232
} // namespace mlir::qco
File renamed without changes.

mlir/lib/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,4 @@
99
add_subdirectory(Conversion)
1010
add_subdirectory(Compiler)
1111
add_subdirectory(Dialect)
12-
add_subdirectory(Passes)
1312
add_subdirectory(Support)

mlir/lib/Dialect/QCO/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@
88

99
add_subdirectory(Builder)
1010
add_subdirectory(IR)
11+
add_subdirectory(Transforms)
1112
add_subdirectory(Utils)

mlir/lib/Passes/CMakeLists.txt renamed to mlir/lib/Dialect/QCO/Transforms/CMakeLists.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,24 @@ file(GLOB_RECURSE PASSES_SOURCES *.cpp)
1111
get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
1212

1313
add_mlir_library(
14-
QcoPasses
14+
MLIRQCOTransforms
1515
${PASSES_SOURCES}
1616
LINK_LIBS
1717
PUBLIC
1818
PRIVATE
1919
${dialect_libs}
2020
DEPENDS
21-
QcoPassesIncGen)
21+
MLIRQCOTransformsIncGen)
2222

2323
# collect header files
24-
file(GLOB_RECURSE PASSES_HEADERS_SOURCE ${MQT_MLIR_SOURCE_INCLUDE_DIR}/mlir/Passes/*.h)
25-
file(GLOB_RECURSE PASSES_HEADERS_BUILD ${MQT_MLIR_BUILD_INCLUDE_DIR}/mlir/Passes/*.inc)
24+
file(GLOB_RECURSE PASSES_HEADERS_SOURCE
25+
${MQT_MLIR_SOURCE_INCLUDE_DIR}/mlir/Dialect/QCO/Transforms/*.h)
26+
file(GLOB_RECURSE PASSES_HEADERS_BUILD
27+
${MQT_MLIR_BUILD_INCLUDE_DIR}/mlir/Dialect/QCO/Transforms/*.inc)
2628

2729
# add public headers using file sets
2830
target_sources(
29-
QcoPasses
31+
MLIRQCOTransforms
3032
PUBLIC FILE_SET
3133
HEADERS
3234
BASE_DIRS

0 commit comments

Comments
 (0)