summaryrefslogtreecommitdiff
path: root/compiler/optimizing/graph_visualizer.h
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/optimizing/graph_visualizer.h')
-rw-r--r--compiler/optimizing/graph_visualizer.h36
1 files changed, 4 insertions, 32 deletions
diff --git a/compiler/optimizing/graph_visualizer.h b/compiler/optimizing/graph_visualizer.h
index 60d996ba88..bc553aed74 100644
--- a/compiler/optimizing/graph_visualizer.h
+++ b/compiler/optimizing/graph_visualizer.h
@@ -27,52 +27,24 @@ class CodeGenerator;
class DexCompilationUnit;
class HGraph;
-// TODO: Create an analysis/optimization abstraction.
-static const char* kLivenessPassName = "liveness";
-static const char* kRegisterAllocatorPassName = "register";
-
/**
- * If enabled, emits compilation information suitable for the c1visualizer tool
- * and IRHydra.
- * Currently only works if the compiler is single threaded.
+ * This class outputs the HGraph in the C1visualizer format.
+ * Note: Currently only works if the compiler is single threaded.
*/
class HGraphVisualizer : public ValueObject {
public:
- /**
- * If output is not null, and the method name of the dex compilation
- * unit contains `string_filter`, the compilation information will be
- * emitted.
- */
- HGraphVisualizer(std::ostream* output,
- HGraph* graph,
- const char* string_filter,
- const CodeGenerator& codegen,
- const DexCompilationUnit& cu);
-
- /**
- * Version of `HGraphVisualizer` for unit testing, that is when a
- * `DexCompilationUnit` is not available.
- */
HGraphVisualizer(std::ostream* output,
HGraph* graph,
const CodeGenerator& codegen,
- const char* name);
+ const char* method_name);
- /**
- * If this visualizer is enabled, emit the compilation information
- * in `output_`.
- */
- void DumpGraph(const char* pass_name) const;
+ void DumpGraph(const char* pass_name, bool is_after_pass = true) const;
private:
std::ostream* const output_;
HGraph* const graph_;
const CodeGenerator& codegen_;
- // Is true when `output_` is not null, and the compiled method's name
- // contains the string_filter given in the constructor.
- bool is_enabled_;
-
DISALLOW_COPY_AND_ASSIGN(HGraphVisualizer);
};