diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2014-12-01 10:31:54 +0000 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2014-12-15 22:52:27 +0000 |
commit | e53798a7e3267305f696bf658e418c92e63e0834 (patch) | |
tree | 8979bbed96b107a5a6bbae9285ff4e0c362dad95 /compiler/optimizing/graph_visualizer.cc | |
parent | e6c0cdd11097dd72275ac24f1e98217c299d973e (diff) | |
download | android_art-e53798a7e3267305f696bf658e418c92e63e0834.tar.gz android_art-e53798a7e3267305f696bf658e418c92e63e0834.tar.bz2 android_art-e53798a7e3267305f696bf658e418c92e63e0834.zip |
Inlining support in optimizing.
Currently only inlines simple things that don't require an
environment, such as:
- Returning a constant.
- Returning a parameter.
- Returning an arithmetic operation.
Change-Id: Ie844950cb44f69e104774a3cf7a8dea66bc85661
Diffstat (limited to 'compiler/optimizing/graph_visualizer.cc')
-rw-r--r-- | compiler/optimizing/graph_visualizer.cc | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/compiler/optimizing/graph_visualizer.cc b/compiler/optimizing/graph_visualizer.cc index 4ed2156241..5d1703e237 100644 --- a/compiler/optimizing/graph_visualizer.cc +++ b/compiler/optimizing/graph_visualizer.cc @@ -17,7 +17,6 @@ #include "graph_visualizer.h" #include "code_generator.h" -#include "driver/dex_compilation_unit.h" #include "nodes.h" #include "ssa_liveness_analysis.h" @@ -270,39 +269,20 @@ HGraphVisualizer::HGraphVisualizer(std::ostream* output, HGraph* graph, const char* string_filter, const CodeGenerator& codegen, - const DexCompilationUnit& cu) + const char* method_name) : output_(output), graph_(graph), codegen_(codegen), is_enabled_(false) { if (output == nullptr) { return; } - std::string pretty_name = PrettyMethod(cu.GetDexMethodIndex(), *cu.GetDexFile()); - if (pretty_name.find(string_filter) == std::string::npos) { + if (strstr(method_name, string_filter) == nullptr) { return; } is_enabled_ = true; HGraphVisualizerPrinter printer(graph, *output_, "", codegen_); printer.StartTag("compilation"); - printer.PrintProperty("name", pretty_name.c_str()); - printer.PrintProperty("method", pretty_name.c_str()); - printer.PrintTime("date"); - printer.EndTag("compilation"); -} - -HGraphVisualizer::HGraphVisualizer(std::ostream* output, - HGraph* graph, - const CodeGenerator& codegen, - const char* name) - : output_(output), graph_(graph), codegen_(codegen), is_enabled_(false) { - if (output == nullptr) { - return; - } - - is_enabled_ = true; - HGraphVisualizerPrinter printer(graph, *output_, "", codegen_); - printer.StartTag("compilation"); - printer.PrintProperty("name", name); - printer.PrintProperty("method", name); + printer.PrintProperty("name", method_name); + printer.PrintProperty("method", method_name); printer.PrintTime("date"); printer.EndTag("compilation"); } |