diff options
| author | Nicolas Geoffray <ngeoffray@google.com> | 2015-04-17 09:15:11 +0100 |
|---|---|---|
| committer | Nicolas Geoffray <ngeoffray@google.com> | 2015-05-18 10:22:45 +0100 |
| commit | 8826f67ad53099021f6442364348fa66729288d7 (patch) | |
| tree | 3f937444d251efa09174ddb586c0eed6918907f6 /compiler/optimizing/register_allocator.h | |
| parent | ef4366a159ecdd357c98e577583bbe224d065128 (diff) | |
| download | art-8826f67ad53099021f6442364348fa66729288d7.tar.gz art-8826f67ad53099021f6442364348fa66729288d7.tar.bz2 art-8826f67ad53099021f6442364348fa66729288d7.zip | |
Callee/caller save logic in register allocator.
Prevent intervals that do not span a 'will-call' safepoint
to allocate a callee-save register when caller-saves
are available.
Change-Id: I6e613ab54b087f433bbc433aa62847fbca423377
Diffstat (limited to 'compiler/optimizing/register_allocator.h')
| -rw-r--r-- | compiler/optimizing/register_allocator.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/optimizing/register_allocator.h b/compiler/optimizing/register_allocator.h index dc9c708eea..6d5bfc3f0d 100644 --- a/compiler/optimizing/register_allocator.h +++ b/compiler/optimizing/register_allocator.h @@ -140,7 +140,8 @@ class RegisterAllocator { void DumpInterval(std::ostream& stream, LiveInterval* interval) const; void DumpAllIntervals(std::ostream& stream) const; int FindAvailableRegisterPair(size_t* next_use, size_t starting_at) const; - int FindAvailableRegister(size_t* next_use) const; + int FindAvailableRegister(size_t* next_use, LiveInterval* current) const; + bool IsCallerSaveRegister(int reg) const; // Try splitting an active non-pair or unaligned pair interval at the given `position`. // Returns whether it was successful at finding such an interval. |
