diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2014-09-16 14:11:14 +0100 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2014-09-16 14:15:22 +0100 |
commit | aac0f39a3501a7f7dd04b2342c2a16961969f139 (patch) | |
tree | ef71b73a7d95de726d36883e6c88f7c8cbcfaaf6 /compiler/optimizing/register_allocator.h | |
parent | 56369897d662ea63ea5ed57ae36af0ae0fa1452d (diff) | |
download | art-aac0f39a3501a7f7dd04b2342c2a16961969f139.zip art-aac0f39a3501a7f7dd04b2342c2a16961969f139.tar.gz art-aac0f39a3501a7f7dd04b2342c2a16961969f139.tar.bz2 |
Fix a bug in the register allocator.
We need to take the live interval that starts first to know
until when a register is free, instead of using the live interval
that is last in the inactive list.
Change-Id: I2c9f87481ff1b4fc7b9948db7559b8d3b11d84ce
Diffstat (limited to 'compiler/optimizing/register_allocator.h')
-rw-r--r-- | compiler/optimizing/register_allocator.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/optimizing/register_allocator.h b/compiler/optimizing/register_allocator.h index f737491..7d397e3 100644 --- a/compiler/optimizing/register_allocator.h +++ b/compiler/optimizing/register_allocator.h @@ -21,6 +21,8 @@ #include "primitive.h" #include "utils/growable_array.h" +#include "gtest/gtest.h" + namespace art { class CodeGenerator; @@ -177,6 +179,8 @@ class RegisterAllocator { // Slots reserved for out arguments. size_t reserved_out_slots_; + FRIEND_TEST(RegisterAllocatorTest, FreeUntil); + DISALLOW_COPY_AND_ASSIGN(RegisterAllocator); }; |