My C compiler, Lance, recently got a major optimization update.
The new optimizations are loop unrolling and function inlining, now available through a shiny new -O2 flag. They are both implemented at the IR level (without LLVM ofc), and function inlining proved to provide the most performance gains, while gains from loop unrolling are much more situational
Loop unrolling and function inlining both are configurable by the user through the Lance CLI (shown in --help), so you can tune it to your specific needs.
There are now 4 optimization levels: -O0, -O1, -O2, and -Os.
-O1 enables basic optimizations. -O2 enables these new optimizations. -Os on most programs outputs a significantly lower binary size (often over 7% reduction over -O1), through tweaking Lance's custom x86 backend.