Comment by astrange
3 months ago
You can eliminate flag generation almost all the time with a little optimization (slash deoptimizing if you hit an unexpected use) but it certainly is less convenient to have to implement an optimizer.
3 months ago
You can eliminate flag generation almost all the time with a little optimization (slash deoptimizing if you hit an unexpected use) but it certainly is less convenient to have to implement an optimizer.
The unexpectedly hard bit is switch statements, which are the main case in which compiled code has two back to back jumps... therefore the input flags come from a different basic block and you don't know which instruction generated it.