Comment by WalterBright
2 years ago
Where things get fun is when two optimizations combine to make things worse. They never tell you about that in compiler class!
It's like designing a house. If you want the master closet bigger, the master bath has to shrink. Everything is a tradeoff.
You have this exact issue in VLIW and it's exactly where you can't cheat by using heuristics:
Combinatorial Register Allocation and Instruction Scheduling
https://dl.acm.org/doi/10.1145/3332373