Skip to content

RGBLINT tool to optimize and improve code #1807

@Rangi42

Description

@Rangi42

There are many "peephole" optimizations that can be applied by searching for suboptimal patterns of assembly code. There may also be reasons to lint code besides optimization (and besides consistent formatting, which would be its own tool; see #1796).

This would be like optimize.py, but ideally running faster, and not tied to pret's preferred formatting and macros (generalizable to all of GB dev). On the other hand, it should have a way to easily define custom lint rules, so it can recognize project-specific macros and exceptions. (For instance, in pret jmp should be recognized by all relevant patterns as a jump instruction, and the Hungarian h/w/v/s RAM prefixes are relevant for some patterns.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementTypically new features; lesser priority than bugsgood first issueNew to the codebase? You can help no problem!new toolThis involves writing a new program for the RGBDS package

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions