Improve IsDeadAndRemovable

Investigating DCE I noticed that it was the 3rd most time consuming
optimization phase (Inliner, GVN, DCE) on local pprof profiles.
Inside RemoveDeadInstructions we ask IsDeadAndRemovable for every
instruction and Phi. We can speed it up by:

 * Swap the order of IsDead and IsRemovable for earlier breaks with
   e.g. LoadClass. LoadClass instructions are used by ClinitCheck
   instructions (until very late in the graph). These instructions
   are never going to be removed in DCE.
 * Phi instructions always pass the IsRemovable check so we can
   skip it.

Swapping the order improves RemoveDeadInstructions by ~20%, which
is DCE's most time consuming method. Overall, DCE improves by ~5%
and in my local trace now is the 4th most time consuming
optimization (LSE is now 3rd).

The Phi optimization didn't show up in my pprof profile. It may
improve apps with many Phi instructions.

Test: Locally compile and take a look at pprof profiles
Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b
Change-Id: I59932a8d8d627fc71628e2255582f35282dd0b4e
2 files changed