Limit size of generated machine code to allow more efficient branching.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
Most architectures have smaller and more efficient ways of branching to "near" locations than "far" locations.
In x86-64 a branch to a location within 2GB is smaller than to an arbitrary 64 bit location.
Likewise, in AArch64, a branch to within 1MB is a single instruction, but further branches will take more instructions.
We should limit the size of traces such that we can use more efficient branches in the generated machine code.
This will have little or no impact, as traces in release builds are unlikely to ever reach this limit, but we will to need enforce it for correctness, especially in debug builds.
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
No file or test is named. Start by locating trace generation and the architecture-specific branch emission for x86-64 and AArch64, then determine where a trace-size limit can be enforced. Done means generated traces stay within the intended branch range, including in debug builds, without affecting normal release behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- compilers, performance
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100