ATALAN Compiler Optimizations

Atalan compiler performs extensive code optimizations. As 6502 family processors are very irregular, common optimization methods had to be tailored and some special techniques had to be developed to fit the 6502 instruction set.

For example, due to low number of registers (A,X,Y) and their specialized functions, usual register allocation technique could not be used.

However, all optimizations are programmed in such a way as to allow easy implementation of other processors.

Local variable optimization

Procedure local variables and arguments are internaly allocated as global variables. Atalan analyzes procedure call chain and if possible, reuses global variable space to several procedures.

Procedure optimizations

Instruction level optimizations

Local optimizations

Array optimizations

Control flow optimizations

Loop optimizations

Macro expansion

Data-flow analysis