diff options
author | 2015-01-23 14:39:08 +0000 | |
---|---|---|
committer | 2015-02-04 13:47:49 +0000 | |
commit | 5e8b137d28c840b128e2488f954cccee3e86db14 (patch) | |
tree | c56e4c709ce07d605ab4b754e89f7739264feb73 /compiler/optimizing/inliner.cc | |
parent | f9af19413333c271192c3b11425f865bd8054c0c (diff) |
Create HGraph outside Builder, print timings
This patch refactors the way HGraph objects are created, moving the
instantiation out of the Builder class and creating the CodeGenerator
earlier. The patch uses this to build a single interface for printing
timings info and dumping the CFG.
Change-Id: I2eb63eabf28e2d0f5cdc7affaa690c3a4b1bdd21
Diffstat (limited to 'compiler/optimizing/inliner.cc')
-rw-r--r-- | compiler/optimizing/inliner.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/compiler/optimizing/inliner.cc b/compiler/optimizing/inliner.cc index 41e516492a..32f6972c84 100644 --- a/compiler/optimizing/inliner.cc +++ b/compiler/optimizing/inliner.cc @@ -124,16 +124,18 @@ bool HInliner::TryInline(HInvoke* invoke_instruction, resolved_method->GetAccessFlags(), nullptr); + HGraph* callee_graph = + new (graph_->GetArena()) HGraph(graph_->GetArena(), graph_->GetCurrentInstructionId()); + OptimizingCompilerStats inline_stats; - HGraphBuilder builder(graph_->GetArena(), + HGraphBuilder builder(callee_graph, &dex_compilation_unit, &outer_compilation_unit_, &outer_dex_file, compiler_driver_, &inline_stats); - HGraph* callee_graph = builder.BuildGraph(*code_item, graph_->GetCurrentInstructionId()); - if (callee_graph == nullptr) { + if (!builder.BuildGraph(*code_item)) { VLOG(compiler) << "Method " << PrettyMethod(method_index, outer_dex_file) << " could not be built, so cannot be inlined"; return false; |