%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
// 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_BACKEND_MOVE_OPTIMIZER_H_ #define V8_COMPILER_BACKEND_MOVE_OPTIMIZER_H_ #include "src/common/globals.h" #include "src/compiler/backend/instruction.h" #include "src/zone/zone-containers.h" namespace v8 { namespace internal { namespace compiler { class V8_EXPORT_PRIVATE MoveOptimizer final { public: MoveOptimizer(Zone* local_zone, InstructionSequence* code); MoveOptimizer(const MoveOptimizer&) = delete; MoveOptimizer& operator=(const MoveOptimizer&) = delete; void Run(); private: using MoveOpVector = ZoneVector<MoveOperands*>; using Instructions = ZoneVector<Instruction*>; InstructionSequence* code() const { return code_; } Zone* local_zone() const { return local_zone_; } Zone* code_zone() const { return code()->zone(); } MoveOpVector& local_vector() { return local_vector_; } // Consolidate moves into the first gap. void CompressGaps(Instruction* instr); // Attempt to push down to the last instruction those moves that can. void CompressBlock(InstructionBlock* block); // Consolidate moves into the first gap. void CompressMoves(ParallelMove* left, MoveOpVector* right); // Push down those moves in the gap of from that do not change the // semantics of the from instruction, nor the semantics of the moves // that remain behind. void MigrateMoves(Instruction* to, Instruction* from); void RemoveClobberedDestinations(Instruction* instruction); const Instruction* LastInstruction(const InstructionBlock* block) const; // Consolidate common moves appearing across all predecessors of a block. void OptimizeMerge(InstructionBlock* block); void FinalizeMoves(Instruction* instr); Zone* const local_zone_; InstructionSequence* const code_; MoveOpVector local_vector_; // Reusable buffers for storing operand sets. We need at most two sets // at any given time, so we create two buffers. ZoneVector<InstructionOperand> operand_buffer1; ZoneVector<InstructionOperand> operand_buffer2; }; } // namespace compiler } // namespace internal } // namespace v8 #endif // V8_COMPILER_BACKEND_MOVE_OPTIMIZER_H_