Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SSA optimizer and target #37

Open
SamuraiCrow opened this issue Jan 24, 2025 · 2 comments
Open

Add SSA optimizer and target #37

SamuraiCrow opened this issue Jan 24, 2025 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@SamuraiCrow
Copy link
Contributor

Static Single-Assign format reduces complexity in modern compilers. It is used extensively in LLVM but is more practically applied in the use of the QBE backend. Since QBE is MIT licensed and much smaller than LLVM or even GCC, it would seem to be the most obvious target. What is needed to make QBE usable for E is:

  • Add 32-bit processor support to the format using an existing patch
  • Replace C11 dependencies with E equivalents (eg. fprintf with VfPrintF from DOS.library and printf with PrintF)

Compromises:

  • Inline assembly is not supported by this optimizer target
  • Register loading is automatic rather than REG variables and assumed because it has a proper register mapper and spiller.
@SamuraiCrow SamuraiCrow added the enhancement New feature or request label Jan 24, 2025
@SamuraiCrow SamuraiCrow added this to the Release 2.0 milestone Jan 24, 2025
@SamuraiCrow
Copy link
Contributor Author

Depends on #9

@SamuraiCrow
Copy link
Contributor Author

The 32-bit proposed patch is at https://lists.sr.ht/~mpu/qbe/patches/56712

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant