diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2015-01-14 10:45:05 +0000 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2015-01-14 14:45:40 +0000 |
commit | 48c310c431b110f6ab54907da20c4fa39a8f76b8 (patch) | |
tree | 3f8e75544539544feda353a1f225145e5ee41fa0 /compiler/optimizing/parallel_move_resolver.h | |
parent | c40a4350daac81ddbfc5f6ceab934f2180dc4ec6 (diff) | |
download | art-48c310c431b110f6ab54907da20c4fa39a8f76b8.tar.gz art-48c310c431b110f6ab54907da20c4fa39a8f76b8.tar.bz2 art-48c310c431b110f6ab54907da20c4fa39a8f76b8.zip |
Remove constant moves after emitting them in parallel resolver.
This fixes the case where a constant move requires a scratch
register. Note that there is no backend that needs this for now,
but X86 might with the move to hard float.
Change-Id: I37f6b8961b48f2cf6fbc0cd281e70d58466d018e
Diffstat (limited to 'compiler/optimizing/parallel_move_resolver.h')
-rw-r--r-- | compiler/optimizing/parallel_move_resolver.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/optimizing/parallel_move_resolver.h b/compiler/optimizing/parallel_move_resolver.h index 309425ef4d..7ec1dd2deb 100644 --- a/compiler/optimizing/parallel_move_resolver.h +++ b/compiler/optimizing/parallel_move_resolver.h @@ -58,6 +58,9 @@ class ParallelMoveResolver : public ValueObject { }; bool IsScratchLocation(Location loc); + + // Allocate a scratch register for performing a move. The method will try to use + // a register that is the destination of a move, but that move has not been emitted yet. int AllocateScratchRegister(int blocked, int if_scratch, int register_count, bool* spilled); // Emit a move. |