Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Unified Diff: src/compiler/move-optimizer.h

Issue 750813004: [turbofan] add initial move optimizer (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/instruction.h ('k') | src/compiler/move-optimizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/move-optimizer.h
diff --git a/src/compiler/move-optimizer.h b/src/compiler/move-optimizer.h
new file mode 100644
index 0000000000000000000000000000000000000000..bbce6867d613241011fd491774cd85b481dd0b03
--- /dev/null
+++ b/src/compiler/move-optimizer.h
@@ -0,0 +1,44 @@
+// Copyright 2014 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef V8_COMPILER_MOVE_OPTIMIZER_
+#define V8_COMPILER_MOVE_OPTIMIZER_
+
+#include "src/compiler/instruction.h"
+#include "src/zone-containers.h"
+
+namespace v8 {
+namespace internal {
+namespace compiler {
+
+class MoveOptimizer FINAL {
+ public:
+ MoveOptimizer(Zone* local_zone, InstructionSequence* code);
+ void Run();
+
+ private:
+ typedef ZoneVector<MoveOperands*> MoveOpVector;
+
+ InstructionSequence* code() const { return code_; }
+ Zone* local_zone() const { return local_zone_; }
+ Zone* code_zone() const { return code()->zone(); }
+
+ void CompressMoves(MoveOpVector* eliminated, ParallelMove* left,
+ ParallelMove* right);
+ void FinalizeMoves(MoveOpVector* loads, MoveOpVector* new_moves,
+ GapInstruction* gap);
+
+ Zone* const local_zone_;
+ InstructionSequence* const code_;
+ MoveOpVector temp_vector_0_;
+ MoveOpVector temp_vector_1_;
+
+ DISALLOW_COPY_AND_ASSIGN(MoveOptimizer);
+};
+
+} // namespace compiler
+} // namespace internal
+} // namespace v8
+
+#endif // V8_COMPILER_MOVE_OPTIMIZER_
« no previous file with comments | « src/compiler/instruction.h ('k') | src/compiler/move-optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698