diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2021-07-08 10:43:49 -0700 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2021-07-08 10:43:49 -0700 |
commit | c7c67b94d45a85457467c689a35c48da31f29dca (patch) | |
tree | 2cbccdb6c26edcc84ead802da5cfdb66245b3ae5 /compiler/optimizing/graph_visualizer.cc | |
parent | c40a802ad44a0df680e6e4fc557cbb27ba10c152 (diff) | |
parent | 86cd08250e1833e8cb24870996fd83142ac1b2fa (diff) |
Merge 86cd08250e1833e8cb24870996fd83142ac1b2fa on remote branch
Change-Id: I6e32d4007cbeb96a3542b3d10f7d393cace80b89
Diffstat (limited to 'compiler/optimizing/graph_visualizer.cc')
-rw-r--r-- | compiler/optimizing/graph_visualizer.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/optimizing/graph_visualizer.cc b/compiler/optimizing/graph_visualizer.cc index 5a264b7a70..716fee4d3e 100644 --- a/compiler/optimizing/graph_visualizer.cc +++ b/compiler/optimizing/graph_visualizer.cc @@ -656,9 +656,10 @@ class HGraphVisualizerPrinter : public HGraphDelegateVisitor { } else { StartAttributeStream("dex_pc") << "n/a"; } + HBasicBlock* block = instruction->GetBlock(); if (IsPass(kDebugDumpName)) { // Include block name for logcat use. - StartAttributeStream("block") << namer_.GetName(instruction->GetBlock()); + StartAttributeStream("block") << namer_.GetName(block); } instruction->Accept(this); if (instruction->HasEnvironment()) { @@ -710,7 +711,7 @@ class HGraphVisualizerPrinter : public HGraphDelegateVisitor { } } - HLoopInformation* loop_info = instruction->GetBlock()->GetLoopInformation(); + HLoopInformation* loop_info = (block != nullptr) ? block->GetLoopInformation() : nullptr; if (loop_info == nullptr) { StartAttributeStream("loop") << "none"; } else { |