Files
Steinar H. Gunderson 8556c81d80 Add a pass to reverse if/else blocks (#215)
Negates the condition and swaps the blocks, leaving the meaning
the same but often influencing basic block layout (unless the compiler
feels very strongly about it for some reason).

This can generally only run so many times in a permute before it's
not useful anymore, so it's got low default weight, but it's still
a transformation none of the other passes are able to do reliably.

We could be more elegant with inverting conditions, such as writing
(a != b) instead of !(a == b) (or similar with greater-than, de Morgan's
laws, etc.), but generally, this is kept simple for now.
2026-10-06 10:18:29 +02:00
..
2019-03-03 20:48:08 -05:00
2020-04-26 12:01:48 +02:00