diff options
author | Andreas Gampe <agampe@google.com> | 2015-02-19 18:21:24 -0800 |
---|---|---|
committer | Andreas Gampe <agampe@google.com> | 2015-02-24 15:57:15 -0800 |
commit | 7c3952f423b8213083d60596a5f0bf4237ca3f7b (patch) | |
tree | 40cbc6d30e02ab5edd8598d0f811b62f5c6045ba /compiler/optimizing/graph_visualizer.cc | |
parent | 354d58ba776866ea7b1c71f0d0848d5aaa013ae3 (diff) | |
download | android_art-7c3952f423b8213083d60596a5f0bf4237ca3f7b.tar.gz android_art-7c3952f423b8213083d60596a5f0bf4237ca3f7b.tar.bz2 android_art-7c3952f423b8213083d60596a5f0bf4237ca3f7b.zip |
ART: Add -Wunused
Until the global CFLAGS are fixed, add Wunused. Fix declarations
in the optimizing compiler.
Change-Id: Ic4553f08e809dc54f3d82af57ac592622c98e000
Diffstat (limited to 'compiler/optimizing/graph_visualizer.cc')
-rw-r--r-- | compiler/optimizing/graph_visualizer.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/compiler/optimizing/graph_visualizer.cc b/compiler/optimizing/graph_visualizer.cc index c59273753e..cabfa488c0 100644 --- a/compiler/optimizing/graph_visualizer.cc +++ b/compiler/optimizing/graph_visualizer.cc @@ -17,8 +17,10 @@ #include "graph_visualizer.h" #include "code_generator.h" +#include "licm.h" #include "nodes.h" #include "optimization.h" +#include "register_allocator.h" #include "ssa_liveness_analysis.h" namespace art { @@ -188,6 +190,10 @@ class HGraphVisualizerPrinter : public HGraphVisitor { output_ << " " << phi->GetRegNumber(); } + bool IsPass(const char* name) { + return strcmp(pass_name_, name) == 0; + } + void PrintInstruction(HInstruction* instruction) { output_ << instruction->DebugName(); instruction->Accept(this); @@ -211,7 +217,7 @@ class HGraphVisualizerPrinter : public HGraphVisitor { } output_ << "])"; } - if (pass_name_ == kLivenessPassName + if (IsPass(SsaLivenessAnalysis::kLivenessPassName) && is_after_pass_ && instruction->GetLifetimePosition() != kNoLifetime) { output_ << " (liveness: " << instruction->GetLifetimePosition(); @@ -221,7 +227,7 @@ class HGraphVisualizerPrinter : public HGraphVisitor { interval.Dump(output_); } output_ << ")"; - } else if (pass_name_ == kRegisterAllocatorPassName && is_after_pass_) { + } else if (IsPass(RegisterAllocator::kRegisterAllocatorPassName) && is_after_pass_) { LocationSummary* locations = instruction->GetLocations(); if (locations != nullptr) { output_ << " ( "; @@ -236,7 +242,7 @@ class HGraphVisualizerPrinter : public HGraphVisitor { } } output_ << " (liveness: " << instruction->GetLifetimePosition() << ")"; - } else if (pass_name_ == kLoopInvariantCodeMotionPassName) { + } else if (IsPass(LICM::kLoopInvariantCodeMotionPassName)) { output_ << " ( loop_header:"; HLoopInformation* info = instruction->GetBlock()->GetLoopInformation(); if (info == nullptr) { |