DontBelieveMe / helix

"Compiler Optimisation Techniques" - BSc Computer Science Final Year Project (Sheffield Hallam University)
2 stars 0 forks source link

Add equivalent of GCCs `define_expand`. #24

Closed DontBelieveMe closed 2 years ago

DontBelieveMe commented 2 years ago

So that a machine instruction pattern can be used to generate multiple IR machine instructions. This necessary for instructions such as icmp or cbr which currently expand to multiple assembly instructions

DontBelieveMe commented 2 years ago

This isn't implemented exactly in the same way as GCC (thank god), but is in fact worse. jk.

Done in e95a0804a1fabab45dee4bd71f28408e3f9a47ba by allowing define-insn to specify a custom function that is required to output a MachineInstruction from an input Instruction. This allows quite a bit more flexibility, without having to add a load more functionality into MachineDescription.

Closing for now.