Concept Flow - Local optimization (peephole)
Input: Sequence of instructions
Select small window (peephole)
Analyze instructions in window
Apply optimization rules if pattern matches
Replace with optimized instructions
Move window forward
Repeat
Output optimized code
Local optimization scans small groups of instructions to find and replace inefficient patterns with better ones, improving code step-by-step.