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_
10 #include "src/lithium.h"
18 class LGapResolver final BASE_EMBEDDED {
20 explicit LGapResolver(LCodeGen* owner);
22 // Resolve a set of parallel moves, emitting assembler instructions.
23 void Resolve(LParallelMove* parallel_move);
26 // Build the initial list of moves.
27 void BuildInitialMoveList(LParallelMove* parallel_move);
29 // Perform the move at the moves_ index in question (possibly requiring
30 // other moves to satisfy dependencies).
31 void PerformMove(int index);
33 // If a cycle is found in the series of moves, save the blocking value to
34 // a scratch register. The cycle must be found by hitting the root of the
35 // depth-first search.
36 void BreakCycle(int index);
38 // After a cycle has been resolved, restore the value from the scratch
39 // register to its proper destination.
42 // Emit a move and remove it from the move graph.
43 void EmitMove(int index);
45 // Verify the move list before performing moves.
50 // List of moves not yet resolved.
51 ZoneList<LMoveOperands> moves_;
55 LOperand* saved_destination_;
58 } } // namespace v8::internal
60 #endif // V8_MIPS_LITHIUM_GAP_RESOLVER_MIPS_H_