summaryrefslogtreecommitdiffstats
path: root/compiler/optimizing/register_allocator.h
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2015-04-23 15:14:36 +0100
committerNicolas Geoffray <ngeoffray@google.com>2015-04-23 18:27:05 +0100
commit8cbab3c4de3328b576454ce702d7748f56c44346 (patch)
tree8d95b5f6d451983350839a2b294b4bc869bd852a /compiler/optimizing/register_allocator.h
parentb4186df6c48a88ad8028fcf9e1dac5ce6c391de2 (diff)
downloadart-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.h')
-rw-r--r--compiler/optimizing/register_allocator.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/optimizing/register_allocator.h b/compiler/optimizing/register_allocator.h
index 717be75533..dc9c708eea 100644
--- a/compiler/optimizing/register_allocator.h
+++ b/compiler/optimizing/register_allocator.h
@@ -86,8 +86,12 @@ class RegisterAllocator {
// Add `interval` in the given sorted list.
static void AddSorted(GrowableArray<LiveInterval*>* array, LiveInterval* interval);
- // Split `interval` at the position `at`. The new interval starts at `at`.
- LiveInterval* Split(LiveInterval* interval, size_t at);
+ // Split `interval` at the position `position`. The new interval starts at `position`.
+ LiveInterval* Split(LiveInterval* interval, size_t position);
+
+ // Split `interval` at a position between `from` and `to`. The method will try
+ // to find an optimal split position.
+ LiveInterval* SplitBetween(LiveInterval* interval, size_t from, size_t to);
// Returns whether `reg` is blocked by the code generator.
bool IsBlocked(int reg) const;