summaryrefslogtreecommitdiff
path: root/compiler/driver/compiler_driver.h
diff options
context:
space:
mode:
author Mingyao Yang <mingyao@google.com> 2018-01-24 21:26:25 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2018-01-24 21:26:25 +0000
commitd3233abdf14f173bb99e3905e8543ffff845230e (patch)
treee1fd1abd81da728cd004b1982f7c04cccfa7d6b0 /compiler/driver/compiler_driver.h
parent0e920facfcc1cdc12f08ef269746563f8f801f9b (diff)
parent718e8319c728e9ee2ec15b1d56ca96baa4393028 (diff)
Merge "ART: Use the bitstring type check for AOT app compilation."
Diffstat (limited to 'compiler/driver/compiler_driver.h')
-rw-r--r--compiler/driver/compiler_driver.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/compiler/driver/compiler_driver.h b/compiler/driver/compiler_driver.h
index 18b1e0ea3c..fc77656761 100644
--- a/compiler/driver/compiler_driver.h
+++ b/compiler/driver/compiler_driver.h
@@ -385,12 +385,17 @@ class CompilerDriver {
return dex_to_dex_compiler_;
}
+ bool IsBootImageClassWithAssignedBitstring(ObjPtr<mirror::Class> klass)
+ REQUIRES_SHARED(Locks::mutator_lock_);
+
private:
void PreCompile(jobject class_loader,
const std::vector<const DexFile*>& dex_files,
TimingLogger* timings)
REQUIRES(!Locks::mutator_lock_);
+ void RecordBootImageClassesWithAssignedBitstring() REQUIRES(!Locks::mutator_lock_);
+
void LoadImageClasses(TimingLogger* timings) REQUIRES(!Locks::mutator_lock_);
// Attempt to resolve all type, methods, fields, and strings
@@ -513,6 +518,12 @@ class CompilerDriver {
// This option may be restricted to the boot image, depending on a flag in the implementation.
std::unique_ptr<std::unordered_set<std::string>> methods_to_compile_;
+ // For AOT app compilation, we keep the set of boot image classes with assigned type check
+ // bitstring. We need to retrieve this set before we initialize app image classes as the
+ // initialization can cause more boot image bitstrings to be assigned.
+ // Note that boot image classes are non-moveable, so it's OK to keep raw pointers.
+ std::unique_ptr<std::unordered_set<mirror::Class*>> boot_image_classes_with_assigned_bitstring_;
+
std::atomic<uint32_t> number_of_soft_verifier_failures_;
bool had_hard_verifier_failure_;