compiler2: Review and fix problems with LIR

Issue #9 new
Simon Zünd
created an issue

There are currently some issues in the LIR that I think need to be addressed at some point:

  • When the DAG matcher (#8) is integrated, we need to review all the different kinds of MachineOperands. The embedded_operands are currently only used by X86_64ModRMOperand and the Address MO is not used at all. Maybe we can find an address representation that works on all platforms that does not need tricks like the embedded_operands (They cause issues since you have to remember to handle them during livetime analysis, etc. Especially if someone decides to start nesting them deeper then one level).

  • Ownership of MachineInstructions, MachineOperands and MachineBasicBlocks is not clear and they are not cleaned up after a compiler run. Currently most of these are leaked (!)

  • I am also not a fan of the AREFInst since it is not really an instruction but an operand of array stores and loads, I do not think they are used anywhere else and they cause issues during lowering.

Feel free to add to the list. I just wanted them written down somewhere.

Comments (1)

  1. Log in to comment