1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef V8_MIPS_LITHIUM_GAP_RESOLVER_MIPS_H_
6 #define V8_MIPS_LITHIUM_GAP_RESOLVER_MIPS_H_
8 #include "src/lithium.h"
16 class LGapResolver final BASE_EMBEDDED {
18 explicit LGapResolver(LCodeGen* owner);
20 // Resolve a set of parallel moves, emitting assembler instructions.
21 void Resolve(LParallelMove* parallel_move);
24 // Build the initial list of moves.
25 void BuildInitialMoveList(LParallelMove* parallel_move);
27 // Perform the move at the moves_ index in question (possibly requiring
28 // other moves to satisfy dependencies).
29 void PerformMove(int index);
31 // If a cycle is found in the series of moves, save the blocking value to
32 // a scratch register. The cycle must be found by hitting the root of the
33 // depth-first search.
34 void BreakCycle(int index);
36 // After a cycle has been resolved, restore the value from the scratch
37 // register to its proper destination.
40 // Emit a move and remove it from the move graph.
41 void EmitMove(int index);
43 // Verify the move list before performing moves.
48 // List of moves not yet resolved.
49 ZoneList<LMoveOperands> moves_;
53 LOperand* saved_destination_;
56 } // namespace internal
59 #endif // V8_MIPS_LITHIUM_GAP_RESOLVER_MIPS_H_