summaryrefslogtreecommitdiff
path: root/compiler/optimizing/locations.cc
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2015-09-17 17:03:26 +0100
committer Vladimir Marko <vmarko@google.com> 2015-09-25 12:18:02 +0100
commit2aaa4b5532d30c4e65d8892b556400bb61f9dc8c (patch)
treef4259c33171ec8efd945aeedab1e57feb7970f42 /compiler/optimizing/locations.cc
parent3f4b39dec9ec6b8948ed18b9d65ba49db2465004 (diff)
Optimizing: Tag more arena allocations.
Replace GrowableArray with ArenaVector and tag arena allocations with new allocation types. As part of this, make the register allocator a bit more efficient, doing bulk insert/erase. Some loops are now O(n) instead of O(n^2). Change-Id: Ifac0871ffb34b121cc0447801a2d07eefd308c14
Diffstat (limited to 'compiler/optimizing/locations.cc')
-rw-r--r--compiler/optimizing/locations.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/compiler/optimizing/locations.cc b/compiler/optimizing/locations.cc
index d14dfc190f..ebdf7a2f65 100644
--- a/compiler/optimizing/locations.cc
+++ b/compiler/optimizing/locations.cc
@@ -23,18 +23,15 @@ namespace art {
LocationSummary::LocationSummary(HInstruction* instruction,
CallKind call_kind,
bool intrinsified)
- : inputs_(instruction->GetBlock()->GetGraph()->GetArena(), instruction->InputCount()),
- temps_(instruction->GetBlock()->GetGraph()->GetArena(), 0),
+ : inputs_(instruction->InputCount(),
+ instruction->GetBlock()->GetGraph()->GetArena()->Adapter(kArenaAllocLocationSummary)),
+ temps_(instruction->GetBlock()->GetGraph()->GetArena()->Adapter(kArenaAllocLocationSummary)),
output_overlaps_(Location::kOutputOverlap),
call_kind_(call_kind),
stack_mask_(nullptr),
register_mask_(0),
live_registers_(),
intrinsified_(intrinsified) {
- inputs_.SetSize(instruction->InputCount());
- for (size_t i = 0; i < instruction->InputCount(); ++i) {
- inputs_.Put(i, Location());
- }
instruction->SetLocations(this);
if (NeedsSafepoint()) {