summaryrefslogtreecommitdiff
path: root/compiler/optimizing/parallel_move_resolver.h
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2015-02-10 17:08:47 +0000
committer Nicolas Geoffray <ngeoffray@google.com> 2015-02-10 19:12:59 +0000
commitf7a0c4e421b5edaad5b7a15bfff687da28d0b287 (patch)
tree5423a2357661b80d75cb2e3a2b5395a3fe3cd9b5 /compiler/optimizing/parallel_move_resolver.h
parent0f2433bfcb02a662fe739e8e2b068abc2958e4c1 (diff)
Improve ParallelMoveResolver to work with pairs.
Change-Id: Ie2a540ffdb78f7f15d69c16a08ca2d3e794f65b9
Diffstat (limited to 'compiler/optimizing/parallel_move_resolver.h')
-rw-r--r--compiler/optimizing/parallel_move_resolver.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/compiler/optimizing/parallel_move_resolver.h b/compiler/optimizing/parallel_move_resolver.h
index 7ec1dd2deb..3fa1b37afd 100644
--- a/compiler/optimizing/parallel_move_resolver.h
+++ b/compiler/optimizing/parallel_move_resolver.h
@@ -83,7 +83,15 @@ class ParallelMoveResolver : public ValueObject {
// Perform the move at the moves_ index in question (possibly requiring
// other moves to satisfy dependencies).
- void PerformMove(size_t index);
+ //
+ // Return whether another move in the dependency cycle needs to swap. This
+ // is to handle pair swaps, where we want the pair to swap first to avoid
+ // building pairs that are unexpected by the code generator. For example, if
+ // we were to swap R1 with R2, we would need to update all locations using
+ // R2 to R1. So a (R2,R3) pair register could become (R1,R3). We could make
+ // the code generator understand such pairs, but it's easier and cleaner to
+ // just not create such pairs and exchange pairs in priority.
+ MoveOperands* PerformMove(size_t index);
DISALLOW_COPY_AND_ASSIGN(ParallelMoveResolver);
};