Skip to content
This repository has been archived by the owner on Aug 2, 2019. It is now read-only.

Mu IR rewriting library #48

Open
wks opened this issue Oct 29, 2015 · 0 comments
Open

Mu IR rewriting library #48

wks opened this issue Oct 29, 2015 · 0 comments

Comments

@wks
Copy link
Member

wks commented Oct 29, 2015

Mu aims to be minimal, but such minimalism has made the construction of Mu clients hard. A client-level library can ease the client's job by accepting a slightly higher-level variant of the Mu IR and translating that higher-level IR to actual Mu IR code (and/or HAIL scripts and/or subsequent API calls).

This issue tracks tasks that should be done at this layer.

  • Pre-SSA to SSA converter. Pre-SSA form #44
    • Writing Mu IR in the SSA form is hard, and the goto-with-values form is even harder. The library should automatically convert ordinary CFGs into the goto-with-values form using well-known algorithms.
  • Platform-dependent constant values. Sizeof? #47
    • Some ahead-of-time clients (notably C or other "traditional" languages) exposes platform details to the programmer as compile-time constants, but binding those values too early will make the object code non-portable. The rewriter should help the client determine these values so that the client compiler can be strictly ahead-of-time.
  • Merge Mu IR and HAIL: Heap Allocation and Initialisation Language (HAIL) #29 Initialized aggregate values / objects #46
    • The library is not minimal. Integrating both languages will make the client's job easier.
  • Annotations
    • This will allow clients to attach arbitrary information to the Mu IR code, which can help the client introspect the program at run time.
    • Note that if we need to use system debuggers (such as GDB), then these annotations need to go through the micro VM itself because it is the micro VM's responsibility to generate object codes (including the DWARF debug info).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant