summaryrefslogtreecommitdiff
path: root/compiler/optimizing/builder.cc
diff options
context:
space:
mode:
author Santiago Aboy Solanes <solanes@google.com> 2023-10-30 10:12:01 +0000
committer Santiago Aboy Solanes <solanes@google.com> 2024-01-30 15:33:00 +0000
commitf5307a31f5b67f6184cbb7e8b7fab61be3725fce (patch)
tree01d9284e052f5d96e723989dba214588c5c5d3dc /compiler/optimizing/builder.cc
parentee4c3d633f673be1d43c959a3bc99519a376dba0 (diff)
Allow compilation of large methods with no branches
Popular apps include such methods in their profiles. Having the extra heuristic of skipping compilation for large methods with no branches can be unintuitive for developers who created those profiles. Some apps see startup improvements with this heuristic removed. Bug: 316617683 Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b Change-Id: I21a8da93e89399dac0e45c3ab43a8bbedc925a44
Diffstat (limited to 'compiler/optimizing/builder.cc')
-rw-r--r--compiler/optimizing/builder.cc13
1 files changed, 2 insertions, 11 deletions
diff --git a/compiler/optimizing/builder.cc b/compiler/optimizing/builder.cc
index 48d1a9da2f..9233ea4fcd 100644
--- a/compiler/optimizing/builder.cc
+++ b/compiler/optimizing/builder.cc
@@ -63,7 +63,7 @@ HGraphBuilder::HGraphBuilder(HGraph* graph,
compilation_stats_(nullptr),
return_type_(return_type) {}
-bool HGraphBuilder::SkipCompilation(size_t number_of_branches) {
+bool HGraphBuilder::SkipCompilation() {
if (code_generator_ == nullptr) {
// Note that the codegen is null when unit testing.
return false;
@@ -84,15 +84,6 @@ bool HGraphBuilder::SkipCompilation(size_t number_of_branches) {
return true;
}
- // If it's large and contains no branches, it's likely to be machine generated initialization.
- if (compiler_options.IsLargeMethod(code_units) && (number_of_branches == 0)) {
- VLOG(compiler) << "Skip compilation of large method with no branch "
- << dex_file_->PrettyMethod(dex_compilation_unit_->GetDexMethodIndex())
- << ": " << code_units << " code units";
- MaybeRecordStat(compilation_stats_, MethodCompilationStat::kNotCompiledLargeMethodNoBranches);
- return true;
- }
-
return false;
}
@@ -131,7 +122,7 @@ GraphAnalysisResult HGraphBuilder::BuildGraph() {
// 2) Decide whether to skip this method based on its code size and number
// of branches.
- if (SkipCompilation(block_builder.GetNumberOfBranches())) {
+ if (SkipCompilation()) {
return kAnalysisSkipped;
}