diff options
| author | 2016-04-04 14:36:12 +0000 | |
|---|---|---|
| committer | 2016-04-04 14:36:12 +0000 | |
| commit | eb98c0ded592cfca8187c744393c82efd1020b2a (patch) | |
| tree | 1b1504f200b626c405ce3381743d8ba5825cf9d0 /compiler/optimizing | |
| parent | 2f92ec8a52faa4bc566af8fa34212f3e749e82c8 (diff) | |
| parent | a8013fd4f2630aa45b5a3c320660ac9590523537 (diff) | |
Merge "Please Clang wrt stack frames in HInliner::TryBuildAndInlineHelper."
Diffstat (limited to 'compiler/optimizing')
| -rw-r--r-- | compiler/optimizing/inliner.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/compiler/optimizing/inliner.cc b/compiler/optimizing/inliner.cc index 7068e8bf9b..33803c1093 100644 --- a/compiler/optimizing/inliner.cc +++ b/compiler/optimizing/inliner.cc @@ -1061,14 +1061,19 @@ bool HInliner::TryBuildAndInlineHelper(HInvoke* invoke_instruction, caller_instruction_counter); callee_graph->SetArtMethod(resolved_method); - OptimizingCompilerStats inline_stats; + // When they are needed, allocate `inline_stats` on the heap instead + // of on the stack, as Clang might produce a stack frame too large + // for this function, that would not fit the requirements of the + // `-Wframe-larger-than` option. + std::unique_ptr<OptimizingCompilerStats> inline_stats = + (stats_ == nullptr) ? nullptr : MakeUnique<OptimizingCompilerStats>(); HGraphBuilder builder(callee_graph, &dex_compilation_unit, &outer_compilation_unit_, resolved_method->GetDexFile(), *code_item, compiler_driver_, - &inline_stats, + inline_stats.get(), resolved_method->GetQuickenedInfo(), dex_cache, handles_); |