summaryrefslogtreecommitdiff
path: root/compiler/driver/compiler_options.h
diff options
context:
space:
mode:
author Santiago Aboy Solanes <solanes@google.com> 2021-11-08 17:00:06 +0000
committer Santiago Aboy Solanes <solanes@google.com> 2021-11-11 09:12:07 +0000
commita0232ad060c65d0ac3e022c9f721b41c02fd0b71 (patch)
tree7fcc4bcac3d271342262e03e69cac6dd1deb7a88 /compiler/driver/compiler_options.h
parent6806d3c9e41e0e8b187d5e4c76d48ea6cc90b613 (diff)
Add .bss support for inlining across dexfiles within Oat
We can safely reference other dexfiles within the same oat file for cross-dex inlining. This CL makes the OptStat#NotInlinedBss drop to less than 1% of the not-inlining cases. Test: ART tests Change-Id: I676d48d973abf7a6f8412cf3b7bb73afd7747f31
Diffstat (limited to 'compiler/driver/compiler_options.h')
-rw-r--r--compiler/driver/compiler_options.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/driver/compiler_options.h b/compiler/driver/compiler_options.h
index db17bda7ac..a31be3f640 100644
--- a/compiler/driver/compiler_options.h
+++ b/compiler/driver/compiler_options.h
@@ -373,6 +373,11 @@ class CompilerOptions final {
return initialize_app_image_classes_;
}
+ bool WithinOatFile(const DexFile* dex_file) const {
+ return std::find(GetDexFilesForOatFile().begin(), GetDexFilesForOatFile().end(), dex_file) !=
+ GetDexFilesForOatFile().end();
+ }
+
private:
bool ParseDumpInitFailures(const std::string& option, std::string* error_msg);
bool ParseRegisterAllocationStrategy(const std::string& option, std::string* error_msg);