Contents
ix
Calls, Jumps, and Branches ..............................................11-9
Branch Optimizations ....................................................11-9
Branch Prediction..........................................................11-10
Identification of Leaf Functions......................................11-11
Inline Function Expansion .............................................11-11
Tail-call Elimination........................................................11-12
Loop Optimizations ............................................................11-14
Movement of Loop-invariant Code ................................11-14
Induction Variable Elimination .......................................11-14
Loop Unrolling ...............................................................11-15
Memory Optimizations........................................................11-15
Global Alias Analysis.....................................................11-15
Variable Shadowing ......................................................11-16
Register Use ......................................................................11-16
Local Variable Promotion ..............................................11-17
Register Management...................................................11-17
Register Spilling.............................................................11-17
Instruction Selection and Sequencing................................11-18
Code Compression........................................................11-18
Code Scheduling...........................................................11-18
Specialized-instruction Selection...................................11-20
Program-level Optimization................................................11-20
Inter-module Function Inlining .......................................11-20
Superblock Formation ...................................................11-21
Profile-based Branch-prediction Bit Setting...................11-22
Chapter 12 Caveats
Aliasing Assumptions.........................................................12-1
Alignment Assumptions......................................................12-3
Volatile Objects..................................................................12-4
Known Problems Using the Compiler.................................12-6
Type Promotion.............................................................12-6
Prototype Scope............................................................12-6