Skip to content

🐛 Preserve attributes on reused QIR declarations - #2294

Merged
simon1hofmann merged 1 commit into
mainfrom
codex/2255-qir-runtime-passthrough
Aug 31, 2026
Merged

🐛 Preserve attributes on reused QIR declarations#2294
simon1hofmann merged 1 commit into
mainfrom
codex/2255-qir-runtime-passthrough

Conversation

@simon1hofmann

@simon1hofmann simon1hofmann commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

🤖 AI text below 🤖

Description

Preserves QIR runtime declaration attributes when an existing declaration is
reused.

getOrCreateFunctionDeclaration previously replaced the complete
passthrough array when adding the irreversible marker. The helper now merges
that marker into the existing array, preserves unrelated attributes, and avoids
duplicates across repeated calls.

This is one focused replacement for draft PR #2287 and addresses part of #2255.

Validation

  • focused passthrough regression — passed
  • full QIR IR suite — 117/117 passed
  • uvx nox -s lint — passed
  • git diff --check — passed

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.

AI assistance disclosure: Codex extracted this focused change from the
authorized #2255 audit, validated it, and drafted this description.

Merge the irreversible marker into reused measurement and reset declarations without dropping existing attributes or adding duplicates.

Assisted-by: GPT-5 via Codex
@simon1hofmann simon1hofmann self-assigned this Aug 31, 2026
@simon1hofmann simon1hofmann added c++ Anything related to C++ code code quality Code quality improvements fix Fix for something that isn't working MLIR Anything related to MLIR QIR Anything related to QIR skip-changelog Changes that do not need to show up in the changelog labels Aug 31, 2026
@burgholzer burgholzer modified the milestones: MLIR Support, QIR Support Aug 31, 2026

@burgholzer burgholzer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also LGTM 👍🏼

@simon1hofmann
simon1hofmann enabled auto-merge (squash) August 31, 2026 18:24
@codecov

codecov Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@simon1hofmann
simon1hofmann merged commit f63977b into main Aug 31, 2026
30 of 45 checks passed
@simon1hofmann
simon1hofmann deleted the codex/2255-qir-runtime-passthrough branch August 31, 2026 21:13
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 code quality Code quality improvements fix Fix for something that isn't working MLIR Anything related to MLIR QIR Anything related to QIR skip-changelog Changes that do not need to show up in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants