Index: src/compiler/register-allocator.h |
diff --git a/src/compiler/register-allocator.h b/src/compiler/register-allocator.h |
index 504cdb229f22247f077b919a4648899263614ef2..aba7e8cb10a3939d1f41d62b020a1b4f697d66ed 100644 |
--- a/src/compiler/register-allocator.h |
+++ b/src/compiler/register-allocator.h |
@@ -466,6 +466,7 @@ class RegisterAllocator FINAL : public ZoneObject { |
void InactiveToActive(LiveRange* range); |
// Helper methods for allocating registers. |
+ bool TryReuseSpillForPhi(LiveRange* range); |
bool TryAllocateFreeReg(LiveRange* range); |
void AllocateBlockedReg(LiveRange* range); |
SpillRange* AssignSpillRangeToLiveRange(LiveRange* range); |
@@ -546,6 +547,15 @@ class RegisterAllocator FINAL : public ZoneObject { |
const char* debug_name() const { return debug_name_; } |
const RegisterConfiguration* config() const { return config_; } |
+ struct PhiMapValue { |
+ PhiMapValue(PhiInstruction* phi, const InstructionBlock* block) |
+ : phi(phi), block(block) {} |
+ PhiInstruction* const phi; |
+ const InstructionBlock* const block; |
+ }; |
+ typedef std::map<int, PhiMapValue, std::less<int>, |
+ zone_allocator<std::pair<int, PhiMapValue>>> PhiMap; |
+ |
Zone* const local_zone_; |
Frame* const frame_; |
InstructionSequence* const code_; |
@@ -553,6 +563,8 @@ class RegisterAllocator FINAL : public ZoneObject { |
const RegisterConfiguration* config_; |
+ PhiMap phi_map_; |
+ |
// During liveness analysis keep a mapping from block id to live_in sets |
// for blocks already analyzed. |
ZoneVector<BitVector*> live_in_sets_; |