From f7a0c4e421b5edaad5b7a15bfff687da28d0b287 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Tue, 10 Feb 2015 17:08:47 +0000 Subject: Improve ParallelMoveResolver to work with pairs. Change-Id: Ie2a540ffdb78f7f15d69c16a08ca2d3e794f65b9 --- compiler/optimizing/parallel_move_resolver.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'compiler/optimizing/parallel_move_resolver.h') 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); }; -- cgit v1.2.3-59-g8ed1b