| ▲ | elphard 3 hours ago | |
I like that you are treating peephole as a strict fallback after IR optimizations, with a tiny window and single pass. In a lot of compilers this stage turns into a junk drawer of pattern matches that quietly grow until no one remembers why half of them exist. The opt_trace! hook is the underrated bit here. Once you start rewriting instruction sequences, knowing which patterns fire and how often on real programs is usually more valuable than another synthetic benchmark. Keeping it behind -O1 is a nice way to make sure you only pay for that complexity when users actually opt in. | ||