diff options
author | 2022-12-08 19:10:57 +0000 | |
---|---|---|
committer | 2022-12-14 11:57:08 +0000 | |
commit | 69293b075b620448b1c86b0f993c2681c60f3529 (patch) | |
tree | 3b3ffa4eb1dfe882e21793f24aa256aed51dc031 /compiler/optimizing/inliner.cc | |
parent | 8e94a6f6c6b2678822d5141e26a0743722d2c119 (diff) |
Move adding extra goto blocks to InlineInto
There are some cases in which we need to add extra goto blocks
when inlining to avoid critical edges. The `TryBoundary` of
`kind:exit` instructions will always have more than one successor
(normal flow and exceptional flow). If its normal flow successor
has more than one predecessor, we would be introducing a critical edge.
We can avoid the critical edge in InlineInto instead of doing it in
the builder which helps decoupling those two stages as well as
simplifying surrounding code.
We also have the benefit of adding the extra goto blocks only
when necessary.
Bug: 227283224
Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b
Change-Id: Ibe21623c94c798f7cea60ff892064e63a38a787a
Diffstat (limited to 'compiler/optimizing/inliner.cc')
-rw-r--r-- | compiler/optimizing/inliner.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/optimizing/inliner.cc b/compiler/optimizing/inliner.cc index 1f7ef2cf4c..2645cf1e49 100644 --- a/compiler/optimizing/inliner.cc +++ b/compiler/optimizing/inliner.cc @@ -2119,7 +2119,7 @@ bool HInliner::TryBuildAndInlineHelper(HInvoke* invoke_instruction, codegen_, inline_stats_); - if (builder.BuildGraph(/* build_for_inline= */ true) != kAnalysisSuccess) { + if (builder.BuildGraph() != kAnalysisSuccess) { LOG_FAIL(stats_, MethodCompilationStat::kNotInlinedCannotBuild) << "Method " << callee_dex_file.PrettyMethod(method_index) << " could not be built, so cannot be inlined"; |