diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-06-30 10:01:22 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-06-30 10:01:22 +0000 |
commit | aae7570ffe491b8139208ab586b5aa6c4dfd15b7 (patch) | |
tree | 2cbccdb6c26edcc84ead802da5cfdb66245b3ae5 /compiler/optimizing/graph_visualizer.cc | |
parent | 4d5dadef2f66a00dee5d00d9051ffab0704f4cf3 (diff) | |
parent | 0c439eb5cdabdbec94db42aa3d33c3104d0a551f (diff) |
Snap for 7508253 from 0c439eb5cdabdbec94db42aa3d33c3104d0a551f to s-keystone-qcom-release
Change-Id: I2c12a21bbb5f3d2b3743884fc6e32fd06962bfec
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 { |