Remove tries which don't contain throwing instructions
If nothing can throw within a TryBoundary, we are safe to eliminate
it. We were already doing this at the builder stage, but this CL
takes care of subsequent passes (e.g. we might remove DivZeroCheck
instructions which means that now we know we can't throw).
Sometimes this means we are able to eliminate catch blocks which
brings some code size improvements.
Locally on a Pixel 5 compiling with `speed`:
* AGSA -684K (0.2%)
* services.jar -100K (0.2%)
* SystemUIGoogle -88K (0.3%)
Bug: 229249867
Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b
Change-Id: I36d5880be99c1f1109c94266b1be583de8d6cf72
10 files changed