diff options
author | 2015-10-27 16:38:33 -0700 | |
---|---|---|
committer | 2015-10-27 16:43:45 -0700 | |
commit | 7f43a3d48fc29045875d50e10bbc5d6ffc25d61e (patch) | |
tree | 3be4590986faae499384f564acafa5fe04eb68b4 /compiler/dex/quick/gen_common.cc | |
parent | 3dca4c04170bb4c7b26609e55f3f4966d46b681a (diff) |
Enable store elimination for singleton objects.
Enable store elimination for singleton objects. However for finalizable object,
don't eliminate stores. Also added a testcase.
Change-Id: Icf991e7ded5b490f55f580ef928ece5c45e89902
Diffstat (limited to 'compiler/dex/quick/gen_common.cc')
-rw-r--r-- | compiler/dex/quick/gen_common.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/dex/quick/gen_common.cc b/compiler/dex/quick/gen_common.cc index 2b60a51e22..5da72147b0 100644 --- a/compiler/dex/quick/gen_common.cc +++ b/compiler/dex/quick/gen_common.cc @@ -1104,7 +1104,11 @@ void Mir2Lir::GenNewInstance(uint32_t type_idx, RegLocation rl_dest) { // access because the verifier was unable to? const DexFile* dex_file = cu_->dex_file; CompilerDriver* driver = cu_->compiler_driver; - if (driver->CanAccessInstantiableTypeWithoutChecks(cu_->method_idx, *dex_file, type_idx)) { + bool finalizable; + if (driver->CanAccessInstantiableTypeWithoutChecks(cu_->method_idx, + *dex_file, + type_idx, + &finalizable)) { bool is_type_initialized; bool use_direct_type_ptr; uintptr_t direct_type_ptr; |