summaryrefslogtreecommitdiffstats
path: root/compiler/dex/quick/ralloc_util.cc
diff options
context:
space:
mode:
authorVladimir Marko <vmarko@google.com>2014-02-12 18:02:05 +0000
committerVladimir Marko <vmarko@google.com>2014-03-06 15:37:40 +0000
commit83cc7ae96d4176533dd0391a1591d321b0a87f4f (patch)
tree6b3c607119c1dc2850810f8463dfd968c486fba4 /compiler/dex/quick/ralloc_util.cc
parent8785d615122d4abbd22db702139584e8c472f502 (diff)
downloadart-83cc7ae96d4176533dd0391a1591d321b0a87f4f.tar.gz
art-83cc7ae96d4176533dd0391a1591d321b0a87f4f.tar.bz2
art-83cc7ae96d4176533dd0391a1591d321b0a87f4f.zip
Create a scoped arena allocator and use that for LVN.
This saves more than 0.5s of boot.oat compilation time on Nexus 5. TODO: Move other stuff to the scoped allocator. This CL alone increases the peak memory allocation. By reusing the memory for other parts of the compilation we should reduce this overhead. Change-Id: Ifbc00aab4f3afd0000da818dfe68b96713824a08
Diffstat (limited to 'compiler/dex/quick/ralloc_util.cc')
-rw-r--r--compiler/dex/quick/ralloc_util.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/dex/quick/ralloc_util.cc b/compiler/dex/quick/ralloc_util.cc
index 3a8942e46e..3cb6fd01c1 100644
--- a/compiler/dex/quick/ralloc_util.cc
+++ b/compiler/dex/quick/ralloc_util.cc
@@ -907,7 +907,7 @@ void Mir2Lir::DoPromotion() {
const int promotion_threshold = 1;
// Allocate the promotion map - one entry for each Dalvik vReg or compiler temp
promotion_map_ = static_cast<PromotionMap*>
- (arena_->Alloc(num_regs * sizeof(promotion_map_[0]), ArenaAllocator::kAllocRegAlloc));
+ (arena_->Alloc(num_regs * sizeof(promotion_map_[0]), kArenaAllocRegAlloc));
// Allow target code to add any special registers
AdjustSpillMask();
@@ -925,10 +925,10 @@ void Mir2Lir::DoPromotion() {
*/
RefCounts *core_regs =
static_cast<RefCounts*>(arena_->Alloc(sizeof(RefCounts) * num_regs,
- ArenaAllocator::kAllocRegAlloc));
+ kArenaAllocRegAlloc));
RefCounts *FpRegs =
static_cast<RefCounts *>(arena_->Alloc(sizeof(RefCounts) * num_regs * 2,
- ArenaAllocator::kAllocRegAlloc));
+ kArenaAllocRegAlloc));
// Set ssa names for original Dalvik registers
for (int i = 0; i < dalvik_regs; i++) {
core_regs[i].s_reg = FpRegs[i].s_reg = i;