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

Unified Diff: src/compiler/register-allocator.h

Issue 1081373002: [turbofan] cleanup ParallelMove (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 months 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/move-optimizer.cc ('k') | src/compiler/register-allocator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/register-allocator.h
diff --git a/src/compiler/register-allocator.h b/src/compiler/register-allocator.h
index 7a1c596e98256f905ffe748ce014d154c2abadaa..8ab37d19884034c88ff933342bbd2932d36d6e00 100644
--- a/src/compiler/register-allocator.h
+++ b/src/compiler/register-allocator.h
@@ -509,8 +509,9 @@ class RegisterAllocator FINAL : public ZoneObject {
InstructionOperand* hint);
void Use(LifetimePosition block_start, LifetimePosition position,
InstructionOperand* operand, InstructionOperand* hint);
- void AddGapMove(int index, Instruction::GapPosition position,
- InstructionOperand* from, InstructionOperand* to);
+ MoveOperands* AddGapMove(int index, Instruction::GapPosition position,
+ const InstructionOperand& from,
+ const InstructionOperand& to);
// Helper methods for updating the life range lists.
void AddToActive(LiveRange* range);
@@ -574,9 +575,9 @@ class RegisterAllocator FINAL : public ZoneObject {
// Helper methods for resolving control flow.
void ResolveControlFlow(const InstructionBlock* block,
- InstructionOperand* cur_op,
+ const InstructionOperand& cur_op,
const InstructionBlock* pred,
- InstructionOperand* pred_op);
+ const InstructionOperand& pred_op);
void SetLiveRangeAssignedRegister(LiveRange* range, int reg);
@@ -595,6 +596,7 @@ class RegisterAllocator FINAL : public ZoneObject {
const char* RegisterName(int allocation_index);
Instruction* InstructionAt(int index) { return code()->InstructionAt(index); }
+ void AssignPhiInput(LiveRange* range, const InstructionOperand& assignment);
Frame* frame() const { return frame_; }
const char* debug_name() const { return debug_name_; }
@@ -613,13 +615,17 @@ class RegisterAllocator FINAL : public ZoneObject {
}
ZoneVector<SpillRange*>& spill_ranges() { return spill_ranges_; }
- struct PhiMapValue {
- PhiMapValue(PhiInstruction* phi, const InstructionBlock* block)
- : phi(phi), block(block) {}
+ class PhiMapValue : public ZoneObject {
+ public:
+ PhiMapValue(PhiInstruction* phi, const InstructionBlock* block, Zone* zone)
+ : phi(phi), block(block), incoming_moves(zone) {
+ incoming_moves.reserve(phi->operands().size());
+ }
PhiInstruction* const phi;
const InstructionBlock* const block;
+ ZoneVector<MoveOperands*> incoming_moves;
};
- typedef ZoneMap<int, PhiMapValue> PhiMap;
+ typedef ZoneMap<int, PhiMapValue*> PhiMap;
Zone* const local_zone_;
Frame* const frame_;
« no previous file with comments | « src/compiler/move-optimizer.cc ('k') | src/compiler/register-allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698