-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Labels
enhancementNew feature or requestNew feature or requestunitaryHACK2025Issues that can receive Unitary Hack bountiesIssues that can receive Unitary Hack bounties
Description
In Module.cc, we have implemented basic functionality to resolve entry points and interpret metadata in a QIR file. However, we have not yet implemented anything that takes advantage of the true LLVM IR capabilities: namely, code simplification and modification through automated refactoring passes.
We want a new interface and example of using LLVM passes to interpret and refactor QIR code. For each case here, add a new helper class in src/qiree (and a new test) that takes a Module and:
- Add dead block elimination: if a block is unreachable or empty, branch statements should bypass it. Add a test using
teleport.ll. - Eliminate dead blocks, and reorder blocks so that the only branching from block A is
br <cond>, label B, label C, and blockBjumps directly to blockC. If multiple branching orelsestatements are encountered, raise an error. (This condition is necessary for QIREE to reformulate blocks as predicates e.g. for connecting with XACC). Test that it works onteleport.ll, and add a new QIR example test where it fails.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestunitaryHACK2025Issues that can receive Unitary Hack bountiesIssues that can receive Unitary Hack bounties