summaryrefslogtreecommitdiff
path: root/compiler/optimizing/profiling_info_builder.cc
diff options
context:
space:
mode:
author Santiago Aboy Solanes <solanes@google.com> 2024-02-08 10:42:21 +0000
committer Santiago Aboy Solanes <solanes@google.com> 2024-02-09 08:56:51 +0000
commitcea2f596f98b79fafaded1c36c98aa3fa04d5147 (patch)
tree4cb3dce68943e4cee513a8e2f6d74e9986899c35 /compiler/optimizing/profiling_info_builder.cc
parent554d48465f31b0e073f2c53a09ed9851f8b3e692 (diff)
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
Diffstat (limited to 'compiler/optimizing/profiling_info_builder.cc')
0 files changed, 0 insertions, 0 deletions