Skip to content

♻️ Split the MQT dialect implementation #2445

Description

@simon1hofmann

🤖 AI text below 🤖

Problem Statement

mlir/lib/Dialect/MQT/IR/MQTDialect.cpp combines dialect registration, typed attribute implementations, and attached-metadata verification. Separate these responsibilities using the existing QC/QCO source organization as a guide.

This is a follow-up to the review comment in #2219, not a prerequisite for that PR.

Proposed Solution

Start with two files:

  • Keep dialect registration, operation/region attribute hooks, and their metadata helpers in MQTDialect.cpp.
  • Move typed attribute definitions, verifiers, and TargetEnvAttr::query into MQTAttributes.cpp, keeping their private helpers together.

Update the existing MLIRMQTDialect CMake target. Preserve public APIs, attribute assembly, verification behavior, and diagnostics; no new abstraction or public helper API is needed. Keep naming and payload-version policy changes out of scope.

Acceptance: existing MQT IR and compiler tests pass, including attribute round trips and invalid-input cases; repository lint and C++ lint pass.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

MLIRAnything related to MLIRc++Anything related to C++ codecode qualityCode quality improvementsrefactorAnything related to code refactoring

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions