DeiMOS – A Superoptimizer for the MOS 6502
Summary
DeiMOS is a MOS 6502 superoptimizer that exhaustively searches instruction sequences to find the most optimal code for a given task. The article outlines the motivation, architecture, and several optimization techniques (checkpointed emulation, pruning branches, branch templates, shadow instructions, Warp parallelism) and provides examples demonstrating small, efficient byte sequences. It also covers implementation details, licensing (Zig, EUPL-1.2), and practical performance characteristics.