summaryrefslogtreecommitdiff
path: root/compiler/optimizing/graph_visualizer.cc
diff options
context:
space:
mode:
author Santiago Aboy Solanes <solanes@google.com> 2022-03-29 16:08:01 +0100
committer Treehugger Robot <treehugger-gerrit@google.com> 2022-03-31 17:20:35 +0000
commit298112a02cf095d6477af382d12efcaa16d6d203 (patch)
tree8bc36332a09e3201cf0ef99b2326ef1f3f7a8513 /compiler/optimizing/graph_visualizer.cc
parent11bdac03c5980cd8e58c87cd7558f472ef3d9881 (diff)
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
Diffstat (limited to 'compiler/optimizing/graph_visualizer.cc')
-rw-r--r--compiler/optimizing/graph_visualizer.cc10
1 files changed, 6 insertions, 4 deletions
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;