[Python] All the variables should be inserted at the top of the entry block
Open
Nobody has claimed this yet.
python bridge
stale-notified
- Dominant language
- C++
- Stars
- 1.1k
- Forks
- 456
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 165
Description
All the variables should be inserted at the top of the entry block, so this alloca, store, alloca pattern would ought to look like alloca, alloca, store, ...
Originally posted by @schweitzpgi in https://github.com/NVIDIA/cuda-quantum/pull/1952#discussion_r1683007179
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Python entry-block handling that inserts variables and inspect how alloca and store operations are emitted. The change is done when variables produce consecutive alloca operations at the top of the entry block, before their stores; no file or test is named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- compilers
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100