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

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

Issue 751543002: [turbofan] put late ssa deconstruction in register allocator behind a flag (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/pipeline.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 8499a7981a510193bfd28e2b569b3b3bea37552a..b70ee6e950ba0cd5f5a59fb9729e14cebcf60fe1 100644
--- a/src/compiler/register-allocator.h
+++ b/src/compiler/register-allocator.h
@@ -198,6 +198,12 @@ class LiveRange FINAL : public ZoneObject {
int spill_start_index() const { return spill_start_index_; }
void set_assigned_register(int reg, Zone* zone);
void MakeSpilled(Zone* zone);
+ bool is_phi() const { return is_phi_; }
+ void set_is_phi(bool is_phi) { is_phi_ = is_phi; }
+ bool is_non_loop_phi() const { return is_non_loop_phi_; }
+ void set_is_non_loop_phi(bool is_non_loop_phi) {
+ is_non_loop_phi_ = is_non_loop_phi;
+ }
// Returns use position in this live range that follows both start
// and last processed use position.
@@ -295,6 +301,8 @@ class LiveRange FINAL : public ZoneObject {
int id_;
bool spilled_;
+ bool is_phi_;
+ bool is_non_loop_phi_;
RegisterKind kind_;
int assigned_register_;
UseInterval* last_interval_;
@@ -363,24 +371,28 @@ class RegisterAllocator FINAL : public ZoneObject {
// Phase 1 : insert moves to account for fixed register operands.
void MeetRegisterConstraints();
- // Phase 2: compute liveness of all virtual register.
+ // Phase 2: deconstruct SSA by inserting moves in successors and the headers
+ // of blocks containing phis.
+ void ResolvePhis();
+
+ // Phase 3: compute liveness of all virtual register.
void BuildLiveRanges();
bool ExistsUseWithoutDefinition();
- // Phase 3: compute register assignments.
+ // Phase 4: compute register assignments.
void AllocateGeneralRegisters();
void AllocateDoubleRegisters();
- // Phase 4: reassign spill splots for maximal reuse.
+ // Phase 5: reassign spill splots for maximal reuse.
void ReuseSpillSlots();
- // Phase 5: compute values for pointer maps.
+ // Phase 6: compute values for pointer maps.
void PopulatePointerMaps(); // TODO(titzer): rename to PopulateReferenceMaps.
- // Phase 6: reconnect split ranges with moves.
+ // Phase 7: reconnect split ranges with moves.
void ConnectRanges();
- // Phase 7: insert moves to connect ranges across basic blocks.
+ // Phase 8: insert moves to connect ranges across basic blocks.
void ResolveControlFlow();
private:
@@ -428,7 +440,7 @@ class RegisterAllocator FINAL : public ZoneObject {
int gap_index);
void MeetRegisterConstraintsForLastInstructionInBlock(
const InstructionBlock* block);
- void ProcessPhis(const InstructionBlock* block);
+ void ResolvePhis(const InstructionBlock* block);
// Helper methods for building intervals.
InstructionOperand* AllocateFixed(UnallocatedOperand* operand, int pos,
« no previous file with comments | « src/compiler/pipeline.cc ('k') | src/compiler/register-allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698