Skip to content

Latest commit

 

History

History
28 lines (26 loc) · 1.38 KB

TODO.md

File metadata and controls

28 lines (26 loc) · 1.38 KB
  • If variable is used before it is defined, there should be an error.

    • The whole assign_homes pass needs some work. Should we run this pass on the QBE ADT instead of the pseudo-x86 ADT?
    • assign_homes currently allocates 8 bytes for all data. W, S can be allocated only 4 bytes(note: padding will need to be added for stack alignment)
  • Register allocation. Currently, everything gets spilled to memory.

  • Currently, no typechecking happens. Typechecking for QBE IR should be fairly straightforward to implement: for a function check that returned value matches the function prototype; for each instruction, check that the arguments being passed typechecks.

  • Strings are not handled.

  • type definitions are currently not implemented.

  • If a function is called that is not defined, assume it is an extern(?)

  • Conversion out of SSA needs to be better. Currently, it naively inserts copys to predecessors. This may lead to many copy instructions.

    There are other concerns here too-- see Torczon & Cooper section 9.3.5

  • Build a testing setup similar to QBE's. A .ssa file will contain QBE functions along with a comment that specifies the driver(in C) and what output it expects. When running the test suite, the test program gets linked to the driver and compared against the specified output.

  • Naming multiple blocks with the same name should cause an error.