From 298112a02cf095d6477af382d12efcaa16d6d203 Mon Sep 17 00:00:00 2001 From: Santiago Aboy Solanes Date: Tue, 29 Mar 2022 16:08:01 +0100 Subject: DCE SimplifyAlwaysThrowing optimizations We can do two optimizations to this method: 1) If we have a try catch in the graph, we now allow to simplify always throwing instructions to point them directly to the exit block. 2) We now allow to simplify always throwing instruction for non-trivial basic blocks i.e. not just Invoke and a Goto. We still require that the second to last instruction is an always throwing invoke followed by a Goto. Bug: 227316307 Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b Change-Id: I8208163e48b07d8a1bb77e11763516f65fb88827 --- compiler/optimizing/graph_visualizer.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'compiler/optimizing/graph_visualizer.cc') diff --git a/compiler/optimizing/graph_visualizer.cc b/compiler/optimizing/graph_visualizer.cc index 716fee4d3e..4a6ee13005 100644 --- a/compiler/optimizing/graph_visualizer.cc +++ b/compiler/optimizing/graph_visualizer.cc @@ -586,6 +586,10 @@ class HGraphVisualizerPrinter : public HGraphDelegateVisitor { StartAttributeStream("kind") << (try_boundary->IsEntry() ? "entry" : "exit"); } + void VisitGoto(HGoto* instruction) override { + StartAttributeStream("target") << namer_.GetName(instruction->GetBlock()->GetSingleSuccessor()); + } + void VisitDeoptimize(HDeoptimize* deoptimize) override { StartAttributeStream("kind") << deoptimize->GetKind(); } @@ -657,10 +661,8 @@ class HGraphVisualizerPrinter : public HGraphDelegateVisitor { StartAttributeStream("dex_pc") << "n/a"; } HBasicBlock* block = instruction->GetBlock(); - if (IsPass(kDebugDumpName)) { - // Include block name for logcat use. - StartAttributeStream("block") << namer_.GetName(block); - } + StartAttributeStream("block") << namer_.GetName(block); + instruction->Accept(this); if (instruction->HasEnvironment()) { StringList envs; -- cgit v1.2.3-59-g8ed1b