diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2015-04-23 15:14:36 +0100 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2015-04-23 18:27:05 +0100 |
commit | 8cbab3c4de3328b576454ce702d7748f56c44346 (patch) | |
tree | 8d95b5f6d451983350839a2b294b4bc869bd852a /compiler/optimizing/register_allocator_test.cc | |
parent | b4186df6c48a88ad8028fcf9e1dac5ce6c391de2 (diff) | |
download | art-8cbab3c4de3328b576454ce702d7748f56c44346.tar.gz art-8cbab3c4de3328b576454ce702d7748f56c44346.tar.bz2 art-8cbab3c4de3328b576454ce702d7748f56c44346.zip |
Linear scan: split at better positions.
- Split at block entry to piggy back on control flow resolution.
- Split at the loop header, if the split position is within a loop.
Change-Id: I718299a58c02ee02a1b22bda589607c69a35f0e8
Diffstat (limited to 'compiler/optimizing/register_allocator_test.cc')
-rw-r--r-- | compiler/optimizing/register_allocator_test.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/optimizing/register_allocator_test.cc b/compiler/optimizing/register_allocator_test.cc index 182cd0e833..8c6d904a4c 100644 --- a/compiler/optimizing/register_allocator_test.cc +++ b/compiler/optimizing/register_allocator_test.cc @@ -854,6 +854,10 @@ TEST(RegisterAllocatorTest, SpillInactive) { X86InstructionSetFeatures::FromCppDefines()); x86::CodeGeneratorX86 codegen(graph, *features_x86.get(), CompilerOptions()); SsaLivenessAnalysis liveness(graph, &codegen); + // Populate the instructions in the liveness object, to please the register allocator. + for (size_t i = 0; i < 32; ++i) { + liveness.instructions_from_lifetime_position_.Add(user); + } RegisterAllocator register_allocator(&allocator, &codegen, liveness); register_allocator.unhandled_core_intervals_.Add(fourth); |