Skip to content

⚡ Avoid redundant target-compilation liveness analysis - #2180

Draft
simon1hofmann wants to merge 4 commits into
codex/classical-control-mappingfrom
codex/target-compilation-liveness-scaling
Draft

⚡ Avoid redundant target-compilation liveness analysis#2180
simon1hofmann wants to merge 4 commits into
codex/classical-control-mappingfrom
codex/target-compilation-liveness-scaling

Conversation

@simon1hofmann

@simon1hofmann simon1hofmann commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

🤖 AI text below 🤖

Description

  • Remove the final whole-IR remove-dead-values pass from target compilation; the earlier QCO cleanup already establishes global liveness.
  • Keep CSE after native synthesis and keep target-conformance verification last.
  • Protect the optimization with an end-to-end fixed-point regression containing a private helper call, dynamic qco.if, and one- and two-qubit synthesis.

Stack

  1. ✨ Preserve classical control through target mapping #2179 — classical-control-aware target mapping
  2. ⚡ Avoid redundant target-compilation liveness analysis #2180 — target-compilation liveness scaling (this PR)
  3. ⚡ Keep wide OpenQASM register conditions linear #2181 — wide OpenQASM register conditions

Testing

  • mqt-core-mlir-unittests-compiler: 146 passed.
  • uvx nox -s lint and git diff --check: passed on the complete detached stack.

AI assistance: Codex assisted with diagnosis, implementation, review, testing, stack construction, and this description.

Checklist

  • The pull request only contains commits that are focused and relevant to this change.
  • I have added appropriate tests that cover the new/changed functionality.
  • I have updated the documentation to reflect these changes.
  • I have added entries to the changelog for any noteworthy additions, changes, fixes, or removals.
  • I have added migration instructions to the upgrade guide (if needed).
  • The changes follow the project's style guidelines and introduce no new warnings.
  • The changes are fully tested and pass the CI checks.
  • I have reviewed my own code changes.

If PR contains AI-assisted content:

  • Any agent that created, edited, or submitted GitHub content was explicitly authorized for that scope, as required by our AI Usage Guidelines.
  • Every agent-authored or agent-edited public text body begins with the visible disclosure 🤖 *AI text below* 🤖 (titles are exempt).
  • I have disclosed AI assistance in the PR description.
  • I confirm that I have personally reviewed and understood all AI-generated content, and accept full responsibility for it.

@simon1hofmann simon1hofmann added this to the MLIR Support milestone Aug 20, 2026
@simon1hofmann simon1hofmann added enhancement Improvement of existing feature c++ Anything related to C++ code MLIR Anything related to MLIR labels Aug 20, 2026
@simon1hofmann simon1hofmann self-assigned this Aug 20, 2026
@codecov

codecov Bot commented Aug 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.21912% with 24 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
mlir/lib/Dialect/QCO/IR/SCF/IfOp.cpp 94.6% 9 Missing ⚠️
...lir/lib/Dialect/QCO/Transforms/Mapping/Mapping.cpp 93.9% 9 Missing ⚠️
mlir/lib/Compiler/TargetCompilation.cpp 95.6% 6 Missing ⚠️

📢 Thoughts on this report? Let us know!

simon1hofmann and others added 4 commits August 24, 2026 13:38
Add opt-in target capabilities, reject unsupported runtime control before mapping, and fold constant QCO index switches. Keep tensor scalarization and exporter support for follow-up changes.

Assisted-by: Codex
Signed-off-by: Simon Hofmann <simon.t.hofmann@tum.de>
Scalarize supported qco.if tensor inputs, keep structured control as a routing boundary, and preserve CBit and memref access order when restoring dominance.

Assisted-by: Codex
Signed-off-by: Simon Hofmann <simon.t.hofmann@tum.de>
Detect complete connectivity in runOnOperation, use identity root placement, and skip initial-layout search and hot routing. Retain zero-SWAP previews on sparse topologies and update the replayed tests to current shared MQT attributes.

Assisted-by: GPT-5.6 Sol via Codex
Drop the post-synthesis RemoveDeadValues pass because the second QCO cleanup establishes global liveness and native synthesis preserves value flow. Keep CSE for local cleanup and add an end-to-end fixed-point regression.

Assisted-by: Codex
Signed-off-by: Simon Hofmann <simon.t.hofmann@tum.de>
@burgholzer
burgholzer force-pushed the codex/target-compilation-liveness-scaling branch from d74e283 to 08515ac Compare August 24, 2026 13:59
@burgholzer burgholzer self-assigned this Aug 24, 2026
@mergify mergify Bot added the conflict label Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Anything related to C++ code conflict enhancement Improvement of existing feature MLIR Anything related to MLIR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants