summaryrefslogtreecommitdiff
path: root/compiler/driver/compiler_driver.cc
diff options
context:
space:
mode:
author Treehugger Robot <treehugger-gerrit@google.com> 2018-01-25 12:39:50 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2018-01-25 12:39:50 +0000
commit83047434e9068afc4114e763a6fbdabeb84ead9b (patch)
tree7ea791b513fa0e7fce7d2edad1ba5aad54918a64 /compiler/driver/compiler_driver.cc
parent8dc11b7951ebb0c8cf3166c0835dcbcbafc01c2b (diff)
parent0be8cabf16ee5fa5186bc90471911336f6c01f19 (diff)
Merge "Revert "ART: Use the bitstring type check for AOT app compilation.""
Diffstat (limited to 'compiler/driver/compiler_driver.cc')
-rw-r--r--compiler/driver/compiler_driver.cc45
1 files changed, 0 insertions, 45 deletions
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc
index 5c649855b6..3720dda0f8 100644
--- a/compiler/driver/compiler_driver.cc
+++ b/compiler/driver/compiler_driver.cc
@@ -878,14 +878,6 @@ void CompilerDriver::PreCompile(jobject class_loader,
TimingLogger* timings) {
CheckThreadPools();
- if (kUseBitstringTypeCheck &&
- !compiler_options_->IsBootImage() &&
- compiler_options_->IsAotCompilationEnabled()) {
- RecordBootImageClassesWithAssignedBitstring();
- VLOG(compiler) << "RecordBootImageClassesWithAssignedBitstring: "
- << GetMemoryUsageString(false);
- }
-
LoadImageClasses(timings);
VLOG(compiler) << "LoadImageClasses: " << GetMemoryUsageString(false);
@@ -954,43 +946,6 @@ void CompilerDriver::PreCompile(jobject class_loader,
}
}
-void CompilerDriver::RecordBootImageClassesWithAssignedBitstring() {
- if (boot_image_classes_with_assigned_bitstring_ != nullptr) {
- return; // Already recorded. (Happens because of class unloading between dex files.)
- }
-
- class Visitor : public ClassVisitor {
- public:
- explicit Visitor(std::unordered_set<mirror::Class*>* recorded_classes)
- : recorded_classes_(recorded_classes) {}
-
- bool operator()(ObjPtr<mirror::Class> klass) OVERRIDE
- REQUIRES(Locks::subtype_check_lock_) REQUIRES_SHARED(Locks::mutator_lock_) {
- DCHECK(klass != nullptr);
- SubtypeCheckInfo::State state = SubtypeCheck<ObjPtr<mirror::Class>>::GetState(klass);
- if (state == SubtypeCheckInfo::kAssigned) {
- recorded_classes_->insert(klass.Ptr());
- }
- return true;
- }
-
- private:
- std::unordered_set<mirror::Class*>* const recorded_classes_;
- };
-
- boot_image_classes_with_assigned_bitstring_.reset(new std::unordered_set<mirror::Class*>());
- Visitor visitor(boot_image_classes_with_assigned_bitstring_.get());
- ClassLinker* class_linker = Runtime::Current()->GetClassLinker();
- ScopedObjectAccess soa(Thread::Current());
- MutexLock subtype_check_lock(soa.Self(), *Locks::subtype_check_lock_);
- class_linker->VisitClasses(&visitor);
-}
-
-bool CompilerDriver::IsBootImageClassWithAssignedBitstring(ObjPtr<mirror::Class> klass) {
- DCHECK(boot_image_classes_with_assigned_bitstring_ != nullptr);
- return boot_image_classes_with_assigned_bitstring_->count(klass.Ptr()) != 0u;
-}
-
bool CompilerDriver::IsImageClass(const char* descriptor) const {
if (image_classes_ != nullptr) {
// If we have a set of image classes, use those.