PSL Optimizer
The PSL Optimizer includes the following:
- PSL Optimizer architecture
- Three levels
- Mutli-pass
- Intermediate code optimizer
- PSL Optimizer functions
- Specifying options
- Command line
- Pragma PSL statement
Levels of Optimization
The PSL Optimizer supports the following levels:
- 0 - no optimization
- Level 1 (peephole) optimization
- Level 2 (local) optimization
- Level 3 (global) optimization
Level 1 Optimization
The following figures provide example code that illustrate Level 1 optimization.
Level 1 - Remove Useless Jumps
Level 1 - Reduce Jump Chains
Level 1 - Remove Redundant Quad
Level 1 - Pack Parameters 
Level 2 Optimization
The following figures provide example code that illustrate Level 2 optimization.
Level 2 - String joining
Level 2 - Fold and propagate
Level 2 - Remove Multiple and unused Definitions
Level 2 - Reorder Parameters 
Level 3 Optimization
The following figures provide example code that illustrate Level 3 optimization.
Level 3 - Remove Unreachable Code
Level 3 - Reduce Block Chains 
The Optimizer and Menu Commands
- Menu commands are compiled for every execution (if in PSL source)
- Optimization is by default 3 (version 3.2 and later)
- Every time cost of optimization (which is expensive): pragma "O0" (O-zero)
- Libraries: No cost
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*