summaryrefslogtreecommitdiff
path: root/compiler/driver/compiler_driver.h
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2017-06-09 15:17:05 +0100
committer Vladimir Marko <vmarko@google.com> 2018-07-12 09:23:17 +0100
commit51b8aafd3beb8855a258383a9eb876a783375629 (patch)
tree002f77eb0308dbb11b6e5e5a88ce4bc19c6ff836 /compiler/driver/compiler_driver.h
parente824cfdcfd41d400237a806ff93caca7f2e51878 (diff)
Fix HClinitCheck elimination in instruction builder.
To handle escaping instances of erroneous classes correctly, we can omit the HClinitCheck only when using a class in the static method of the very same class. Even for superclasses we need to do the check. The new test exposes the cases where we were previously diverging from the RI. Also clean up the CompilerDriver by inlining one function directly to the HInstructionBuild::IsInitialized(.) and removing some related functions that are no longer used. The size of the aosp_taimen-userdebug prebuilts: - before: arm/boot*.oat: 16891788 arm64/boot*.oat: 19815520 oat/arm64/services.odex: 20071624 - after: arm/boot*.oat: 16949532 (+56.4KiB, +0.34%) arm64/boot*.oat: 19889752 (+72.5KiB, +0.37%) oat/arm64/services.odex: 20224328 (+149.1KiB, +0.76%) with minor changes to other app prebuilts. Note: Some of that could be reclaimed by reinstating the old optimization for classes where no bytecode can be executed during initialization (no <clinit> to execute in that class or superclasses). Test: 174-escaping-instance-of-bad-class Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Test: testrunner.py --jvm -t 174 Test: Pixel 2 XL boots. Test: testrunner.py --target --optimizing Bug: 62478025 Change-Id: I41f026ea7fecc615c06e87f3b6cb847de0ede8a6
Diffstat (limited to 'compiler/driver/compiler_driver.h')
-rw-r--r--compiler/driver/compiler_driver.h16
1 files changed, 0 insertions, 16 deletions
diff --git a/compiler/driver/compiler_driver.h b/compiler/driver/compiler_driver.h
index 0a8754a6a6..3d3583cb9b 100644
--- a/compiler/driver/compiler_driver.h
+++ b/compiler/driver/compiler_driver.h
@@ -197,18 +197,6 @@ class CompilerDriver {
uint16_t class_def_index)
REQUIRES(!requires_constructor_barrier_lock_);
- // Are runtime access checks necessary in the compiled code?
- bool CanAccessTypeWithoutChecks(ObjPtr<mirror::Class> referrer_class,
- ObjPtr<mirror::Class> resolved_class)
- REQUIRES_SHARED(Locks::mutator_lock_);
-
- // Are runtime access and instantiable checks necessary in the code?
- // out_is_finalizable is set to whether the type is finalizable.
- bool CanAccessInstantiableTypeWithoutChecks(ObjPtr<mirror::Class> referrer_class,
- ObjPtr<mirror::Class> resolved_class,
- bool* out_is_finalizable)
- REQUIRES_SHARED(Locks::mutator_lock_);
-
// Resolve compiling method's class. Returns null on failure.
ObjPtr<mirror::Class> ResolveCompilingMethodsClass(const ScopedObjectAccess& soa,
Handle<mirror::DexCache> dex_cache,
@@ -324,10 +312,6 @@ class CompilerDriver {
return &compiled_method_storage_;
}
- // Can we assume that the klass is loaded?
- bool CanAssumeClassIsLoaded(mirror::Class* klass)
- REQUIRES_SHARED(Locks::mutator_lock_);
-
const ProfileCompilationInfo* GetProfileCompilationInfo() const {
return profile_compilation_info_;
}