Session Type
Keynote
Date & Time
Wednesday, May 11, 2022, 9:00 AM - 9:50 AM
Name
Finding Missed Optimizations Through the Lens of Dead Code Elimination
Abstract/s
Compilers are foundational software development tools and incorporate increasingly sophisticated optimizations. Due to their complexity, it is difficult to systematically identify opportunities for improving them. Indeed, the automatic discovery of missed optimizations has been an important and significant challenge. We tackle this challenge by introducing a novel, effective approach that, in a simple and general manner, automatically identifies a wide range of missed optimizations. Our core insight is to leverage dead code elimination (DCE) to both analyze how well compilers optimize code and identify missed optimizations: (1) insert "optimization markers'' in the basic blocks of a given program, (2) compute the program's live/dead basic blocks using the "optimization markers'', and (3) identify missed optimizations from how well compilers eliminate dead blocks. We have implemented and open-sourced our approach in our tool DEAD. DEAD can automatically find missed optimizations and regressions and generate minimal test cases. We reported over a hundred such bugs in LLVM and GCC most of which have already been confirmed or fixed, demonstrating our work's strong practical utility.
Location Name
Ballroom 1