Lines Matching full:move
19 // Splits a FP move between two location operands into the equivalent series of
20 // moves between smaller sub-operands, e.g. a double move to two single moves.
23 MoveOperands* Split(MoveOperands* move, MachineRepresentation smaller_rep, in Split() argument
28 const LocationOperand& src_loc = LocationOperand::cast(move->source()); in Split()
29 const LocationOperand& dst_loc = LocationOperand::cast(move->destination()); in Split()
63 // Reuse 'move' for the first fragment. It is not pending. in Split()
64 move->set_source(AllocatedOperand(src_kind, smaller_rep, src_index)); in Split()
65 move->set_destination(AllocatedOperand(dst_kind, smaller_rep, dst_index)); in Split()
74 return move; in Split()
79 MoveOperandKind GetKind(const InstructionOperand& move) { in GetKind() argument
80 if (move.IsConstant()) return kConstant; in GetKind()
81 LocationOperand loc_op = LocationOperand::cast(move); in GetKind()
93 // detect simple non-overlapping moves, and collect FP move representations if in Resolve()
98 MoveOperands* move = (*moves)[i]; in Resolve() local
99 if (move->IsRedundant()) { in Resolve()
105 source_kinds.Add(GetKind(move->source())); in Resolve()
106 destination_kinds.Add(GetKind(move->destination())); in Resolve()
108 move->destination().IsFPRegister()) { in Resolve()
110 LocationOperand::cast(move->destination()).representation()); in Resolve()
117 for (MoveOperands* move : *moves) { in Resolve()
118 assembler_->AssembleMove(&move->source(), &move->destination()); in Resolve()
130 auto move = (*moves)[i]; in Resolve() local
131 if (!move->IsEliminated() && move->destination().IsFloatRegister()) in Resolve()
132 PerformMove(moves, move); in Resolve()
138 auto move = (*moves)[i]; in Resolve() local
139 if (!move->IsEliminated() && move->destination().IsDoubleRegister()) in Resolve()
140 PerformMove(moves, move); in Resolve()
148 auto move = (*moves)[i]; in Resolve() local
149 if (!move->IsEliminated()) PerformMove(moves, move); in Resolve()
153 void GapResolver::PerformMove(ParallelMove* moves, MoveOperands* move) { in PerformMove() argument
154 // Each call to this function performs a move and deletes it from the move in PerformMove()
155 // graph. We first recursively perform any move blocking this one. We mark a in PerformMove()
156 // move as "pending" on entry to PerformMove in order to detect cycles in the in PerformMove()
157 // move graph. We use operand swaps to resolve cycles, which means that a in PerformMove()
158 // call to PerformMove could change any source operand in the move graph. in PerformMove()
159 DCHECK(!move->IsPending()); in PerformMove()
160 DCHECK(!move->IsRedundant()); in PerformMove()
162 // Clear this move's destination to indicate a pending move. The actual in PerformMove()
164 InstructionOperand source = move->source(); in PerformMove()
166 InstructionOperand destination = move->destination(); in PerformMove()
167 move->SetPending(); in PerformMove()
173 // Perform a depth-first traversal of the move graph to resolve dependencies. in PerformMove()
174 // Any unperformed, unpending move with a source the same as this one's in PerformMove()
184 // 'other' must also be an FP location move. Break it into fragments in PerformMove()
185 // of the same size as 'move'. 'other' is set to one of the fragments, in PerformMove()
191 // Though PerformMove can change any source operand in the move graph, in PerformMove()
192 // this call cannot create a blocking move via a swap (this loop does not in PerformMove()
193 // miss any). Assume there is a non-blocking move with source A and this in PerformMove()
194 // move is blocked on source B and there is a swap of A and B. Then A and in PerformMove()
196 // Since this move's destination is B and there is only a single incoming in PerformMove()
197 // edge to an operand, this move must also be involved in the same cycle. in PerformMove()
198 // In that case, the blocking move will be created but will be "pending" in PerformMove()
204 // This move's source may have changed due to swaps to resolve cycles and so in PerformMove()
205 // it may now be the last move in the cycle. If so remove it. in PerformMove()
206 source = move->source(); in PerformMove()
208 move->Eliminate(); in PerformMove()
212 // We are about to resolve this move and don't need it marked as pending, so in PerformMove()
214 move->set_destination(destination); in PerformMove()
216 // The move may be blocked on a (at most one) pending move, in which case we in PerformMove()
217 // have a cycle. Search for such a blocking move and perform a swap to in PerformMove()
220 std::find_if(moves->begin(), moves->end(), [&](MoveOperands* move) { in PerformMove() argument
221 return !move->IsEliminated() && in PerformMove()
222 move->source().InterferesWith(destination); in PerformMove()
225 // The easy case: This move is not blocked. in PerformMove()
227 move->Eliminate(); in PerformMove()
236 move->Eliminate(); in PerformMove()