The Pearl framework, a novel deep reinforcement learning approach, automates compiler code optimization by intelligently selecting optimization sequences. Integrated with the Tiramisu compiler, Pearl has achieved significant performance records, including a geometric mean speedup of 2.02x compared to Tiramisu and 3.36x over Pluto, and can generalize optimizations to programs unseen during training.