8cc
8cc copied to clipboard
Optimize some instruction sequences
The following operations are optimized:
- push
- do_emit_assign_deref
- emit_pointer_arith
- emit_ret
- emit_copy_struct
Further optimizations can be done, but would require more information about which values are in which registers at a particular time, and which values need to be preserved across function calls (or by deferring code generation).
As an example of the improvement, the generated EIR files for the old version is 145868 lines of source, and the new version is 121844 lines.