Automatic Architectural Program Rewrites in X
X infers architectural rewrites that make programs run faster. In a Game Boy emulator, it generated a new execution schedule and a new pixel decoder that together delivered 2.39× the throughput of the original X program on Super Mario Land. The source describes one CPU step at a time. When the emulated CPU halts, X works out how far the display and timers can advance together before the next event and generates a single update for that interval. This schedule alone doubled throughput. In the renderer, X packs eight colour indices into one word and draws each pixel in its original order. With both rewrites, the emulator rendered 15,000 frames in a median of 0.438 s, giving 2.36× the throughput of the matched C emulator. X derives these changes from LLVM intermediate representation (IR). The same passes also rewrote two C programs compiled by Clang. Repository: https://github.com/x-lang-project/x-lang
Authors
- William Kirkman-Moller
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-11-26
- DOI
- https://doi.org/10.5281/zenodo.24569264
- Primary Topic
- Parallel Computing and Optimization Techniques
- Type
- preprint