Table of Contents Previous topic Next topic
C COMPILER->Compiler Command Line Options->Favour Faster Code (/Of)
The compiler generates in-line 8051 instructions to represent the programmers C source code. It uses a minimum of calls to pre-written subroutines. So for instance each time two long integers are added together the complete code for this arithmetic operation is created. When it has completely finished generating the code for a module, it will by default search through the complete code for this module looking for sequences of code that occur more than once. Repeating sequences that contain more than approximately 6 bytes of code are extracted and placed in a separate subroutine. This can result in a dramatic reduction in code size. The /Of option tells the compiler not to carry out this common code merging process.
You will obviously want to use this option if you require maximum speed and code size is not an issue. In addition you may wish to use this option to examine the assembler code generated by the compiler. It is not easy to follow the logic of the assembler code after it has been through the merging process.
The optimize pragma can also be used to enable this option. This allows specific functions in a module to be excluded from the merging process.