summaryrefslogtreecommitdiffstats
path: root/compiler/utils/arena_allocator.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/utils/arena_allocator.cc
parent3e1e549c564045d852ace46388eb06427d63e6ca (diff)
downloadart-8dea81ca9c0201ceaa88086b927a5838a06a3e69.tar.gz
art-8dea81ca9c0201ceaa88086b927a5838a06a3e69.tar.bz2
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/utils/arena_allocator.cc')
-rw-r--r--compiler/utils/arena_allocator.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/utils/arena_allocator.cc b/compiler/utils/arena_allocator.cc
index 925d4a287a..da49524ee2 100644
--- a/compiler/utils/arena_allocator.cc
+++ b/compiler/utils/arena_allocator.cc
@@ -32,10 +32,11 @@ static constexpr size_t kValgrindRedZoneBytes = 8;
constexpr size_t Arena::kDefaultSize;
template <bool kCount>
-const char* ArenaAllocatorStatsImpl<kCount>::kAllocNames[kNumArenaAllocKinds] = {
+const char* const ArenaAllocatorStatsImpl<kCount>::kAllocNames[] = {
"Misc ",
"BasicBlock ",
"LIR ",
+ "LIR masks ",
"MIR ",
"DataFlow ",
"GrowList ",
@@ -101,6 +102,7 @@ void ArenaAllocatorStatsImpl<kCount>::Dump(std::ostream& os, const Arena* first,
<< num_allocations << ", avg size: " << bytes_allocated / num_allocations << "\n";
}
os << "===== Allocation by kind\n";
+ COMPILE_ASSERT(arraysize(kAllocNames) == kNumArenaAllocKinds, check_arraysize_kAllocNames);
for (int i = 0; i < kNumArenaAllocKinds; i++) {
os << kAllocNames[i] << std::setw(10) << alloc_stats_[i] << "\n";
}