shecc icon indicating copy to clipboard operation
shecc copied to clipboard

Consider make respective opcode for different IRs

Open ChAoSUnItY opened this issue 6 months ago • 1 comments

While #196 was developing, it caught my eye that there are several opcodes are unused in phase 1 IR but phase 2 and vice versa, for example:

  • OP_jump was never used in phase 1 IR (probably because goto and label definition is not yet implemented?)
  • OP_define is later being added when register allocation is done, in other words, in phase 2 IR, while its actual usage is to allocate stack.
  • OP_phi / OP_unwound_phi are only used in phase 1 and would get eliminated before passed into phase 2 IR.

It would be a good idea to separate these differences to 2 different set of opcode to not to be confused?

ChAoSUnItY avatar May 06 '25 19:05 ChAoSUnItY