The Compiler Information dialog box (Ctrl+Shift+I) shows information about the last project build.
You can show this dialog box either by executing the Project|Show build information menu command, or using the Ctrl+Shift+I keyboard shortcut.
The peephole optimizer
Most of the information shown in this dialog belongs to the peephole optimizer: a software module that detects certain code patterns in the generated IL code and substitutes inefficient encodings by better equivalents. However, the code generator in the Freya compiler generates good quality code, so the peephole generator task is really light.
- Branches to return: these are unconditional branches to a return code. The optimizer substitutes the branch with a direct return. Note that, as a consequence, the return code may become unreachable.
- Loads before return: Freya methods feature a Result variable. A common code sequence stores a value in the local variable representing Result, and immediately reloads that value in the evaluation stack just to quit the method. The store/load sequence is not needed and may be deleted.
- Redundant branches: sometimes, a branch instruction, conditional or unconditional, jumps into another branch instruction. The optimizer follows these cascade jumps and modifies the target for each branch in the chain.
- Redundant stores: the optimizer looks for more store/load sequences involving local variables. When the local variable is referenced only once, both for reading and writing, the corresponding store/load sequence is redundant and can be safely deleted.
- Simplified negations: though there is a Ceq code in IL for check equality, there's no corresponding inequality check, and the compiler must generate a short code sequence for this task. There are contexts, however, where the negation pattern can be simplified by the peephole optimizer.
- Unreachable operations: most of the previous operations create unreachable sections in the IL stream. The next to last check performed by the peephole optimizer is a flow check for detecting and deleting unreachable codes.
The peephole optimizer also takes care for reducing the size of IL branch instructions. Branch codes in IL come in two versions: a long version, using a four byte offset, and a short variant, encoding the offset in a byte. The last pass performed by the optimizer, after flow analysis, computes the real offset between branch instructions and their targets.
See also
The Integrated Development Environment
Project management
Code generation
The Code Editor
Keyboard shortcuts
The Code Snippets manager
Environment options
The Freya Programming Language