summaryrefslogtreecommitdiffstats
path: root/compiler/dex/quick/gen_common.cc
diff options
context:
space:
mode:
authorVladimir Marko <vmarko@google.com>2014-06-06 14:50:36 +0100
committerVladimir Marko <vmarko@google.com>2014-06-12 18:25:00 +0100
commit8dea81ca9c0201ceaa88086b927a5838a06a3e69 (patch)
tree6a074462c1c13d23aa21cef3f4d2d1a7a880de32 /compiler/dex/quick/gen_common.cc
parent3e1e549c564045d852ace46388eb06427d63e6ca (diff)
downloadandroid_art-8dea81ca9c0201ceaa88086b927a5838a06a3e69.tar.gz
android_art-8dea81ca9c0201ceaa88086b927a5838a06a3e69.tar.bz2
android_art-8dea81ca9c0201ceaa88086b927a5838a06a3e69.zip
Rewrite use/def masks to support 128 bits.
Reduce LIR memory usage by holding masks by pointers in the LIR rather than directly and using pre-defined const masks for the common cases, allocating very few on the arena. Change-Id: I0f6d27ef6867acd157184c8c74f9612cebfe6c16
Diffstat (limited to 'compiler/dex/quick/gen_common.cc')
-rw-r--r--compiler/dex/quick/gen_common.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/compiler/dex/quick/gen_common.cc b/compiler/dex/quick/gen_common.cc
index 69ca7154e4..8f6d716ecb 100644
--- a/compiler/dex/quick/gen_common.cc
+++ b/compiler/dex/quick/gen_common.cc
@@ -44,7 +44,7 @@ void Mir2Lir::GenBarrier() {
LIR* barrier = NewLIR0(kPseudoBarrier);
/* Mark all resources as being clobbered */
DCHECK(!barrier->flags.use_def_invalid);
- barrier->u.m.def_mask = ENCODE_ALL;
+ barrier->u.m.def_mask = &kEncodeAll;
}
void Mir2Lir::GenDivZeroException() {
@@ -447,6 +447,7 @@ void Mir2Lir::GenFilledNewArray(CallInfo* info) {
for (int i = 0; i < elems; i++) {
RegLocation loc = UpdateLoc(info->args[i]);
if (loc.location == kLocPhysReg) {
+ ScopedMemRefType mem_ref_type(this, ResourceMask::kDalvikReg);
Store32Disp(TargetReg(kSp), SRegOffset(loc.s_reg_low), loc.reg);
}
}
@@ -484,7 +485,12 @@ void Mir2Lir::GenFilledNewArray(CallInfo* info) {
// Generate the copy loop. Going backwards for convenience
LIR* target = NewLIR0(kPseudoTargetLabel);
// Copy next element
- LoadBaseIndexed(r_src, r_idx, r_val, 2, k32);
+ {
+ ScopedMemRefType mem_ref_type(this, ResourceMask::kDalvikReg);
+ LoadBaseIndexed(r_src, r_idx, r_val, 2, k32);
+ // NOTE: No dalvik register annotation, local optimizations will be stopped
+ // by the loop boundaries.
+ }
StoreBaseIndexed(r_dst, r_idx, r_val, 2, k32);
FreeTemp(r_val);
OpDecAndBranch(kCondGe, r_idx, target);