diff options
author | Dragos Sbirlea <dragoss@google.com> | 2013-08-01 15:38:43 -0700 |
---|---|---|
committer | Dragos Sbirlea <dragoss@google.com> | 2013-08-05 10:21:12 -0700 |
commit | 6447919b5ee8d34c4767f908c7cd7223c224544c (patch) | |
tree | f5931682be1b8e618051b3b2b4150c06aea6825e /compiler/sea_ir/frontend.cc | |
parent | 3d1b8c1931fcc7e1d13a19b09e61a69fafb77d3b (diff) | |
download | art-6447919b5ee8d34c4767f908c7cd7223c224544c.zip art-6447919b5ee8d34c4767f908c7cd7223c224544c.tar.gz art-6447919b5ee8d34c4767f908c7cd7223c224544c.tar.bz2 |
Generation of dot files through visitor.Added type info to .dot.
visitor.h: Fixed formatting.
type_inference.cc: Changed GetSSAConsumers() to return pointer.
sea_node.h, sea.cc: Removed ToDot classes functions.
instruction_nodes.h: Added acessor for SSA producers.
Marked GetUses() as const.
sea.h: Marked fields as const.
frontend.cc: Changed .dot generation code.
code_gen.h: Fixed include to have full path.
Change-Id: Ia84371c171c4537d9cf2f56644baa075f1706df1
Diffstat (limited to 'compiler/sea_ir/frontend.cc')
-rw-r--r-- | compiler/sea_ir/frontend.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/compiler/sea_ir/frontend.cc b/compiler/sea_ir/frontend.cc index cc49ea5..951273c 100644 --- a/compiler/sea_ir/frontend.cc +++ b/compiler/sea_ir/frontend.cc @@ -23,8 +23,11 @@ #include "llvm/llvm_compilation_unit.h" #include "mirror/object.h" #include "runtime.h" -#include "sea_ir/sea.h" + +#include "sea_ir/sea.h" +#include "sea_ir/debug/dot_gen.h" +#include "sea_ir/types/types.h" namespace art { static CompiledMethod* CompileMethodWithSeaIr(CompilerDriver& compiler, @@ -40,9 +43,11 @@ static CompiledMethod* CompileMethodWithSeaIr(CompilerDriver& compiler, // NOTE: Instead of keeping the convention from the Dalvik frontend.cc // and silencing the cpplint.py warning, I just corrected the formatting. VLOG(compiler) << "Compiling " << PrettyMethod(method_idx, dex_file) << "..."; - sea_ir::SeaGraph* sg = sea_ir::SeaGraph::GetCurrentGraph(dex_file); - sg->CompileMethod(code_item, class_def_idx, method_idx, method_access_flags, dex_file); - sg->DumpSea("/tmp/temp.dot"); + sea_ir::SeaGraph* ir_graph = sea_ir::SeaGraph::GetCurrentGraph(dex_file); + ir_graph->CompileMethod(code_item, class_def_idx, method_idx, method_access_flags, dex_file); + sea_ir::DotConversion dc; + std::map<int, const sea_ir::Type*> types = ir_graph->ti_->GetTypeMap(); + dc.DumpSea(ir_graph, "/tmp/temp.dot", &types); CHECK(0 && "No SEA compiled function exists yet."); return NULL; } |