aco: New post-RA optimizer and an assortment of small optimizations
This is something we've been talking about since forver, but nobody had the time to actually do it.
There are a bunch of optimizations which only make sense if RA assigns registers in a certain way. These are not doable in the current pre-RA ACO optimizer, because it can't predict how RA will behave. So, a new post-RA optimizer is added, along with a few small optimizations.
For this initial MR, I only added two optimizations:
- Dead code elimination.
- Start using branch instructions that use VCC, eliminating the need for turning VCC into SCC.
- For instructions where SCC=1 when SDST!=0, use that SCC def directly instead of through a compare.
Fossil DB stats are added to each commit.
Edited by Timur Kristóf