From a0232ad060c65d0ac3e022c9f721b41c02fd0b71 Mon Sep 17 00:00:00 2001 From: Santiago Aboy Solanes Date: Mon, 8 Nov 2021 17:00:06 +0000 Subject: 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 --- compiler/driver/compiler_options.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'compiler/driver/compiler_options.h') 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); -- cgit v1.2.3-59-g8ed1b