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

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

Issue 2060673002: [turbofan] Retiring Greedy Allocator (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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/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 c67d60ed6efe5321ca4ee776bd1667dc7f940a69..933d1d2472974dc4804582618d050baab6805849 100644
--- a/src/compiler/register-allocator.h
+++ b/src/compiler/register-allocator.h
@@ -412,19 +412,9 @@ class LiveRange : public ZoneObject {
void SetUseHints(int register_index);
void UnsetUseHints() { SetUseHints(kUnassignedRegister); }
- // Used solely by the Greedy Allocator:
- unsigned GetSize();
- float weight() const { return weight_; }
- void set_weight(float weight) { weight_ = weight; }
- LiveRangeGroup* group() const { return group_; }
- void set_group(LiveRangeGroup* group) { group_ = group; }
void Print(const RegisterConfiguration* config, bool with_children) const;
void Print(bool with_children) const;
- static const int kInvalidSize = -1;
- static const float kInvalidWeight;
- static const float kMaxWeight;
-
private:
friend class TopLevelLiveRange;
explicit LiveRange(int relative_id, MachineRepresentation rep,
@@ -461,17 +451,6 @@ class LiveRange : public ZoneObject {
mutable UsePosition* current_hint_position_;
// Cache the last position splintering stopped at.
mutable UsePosition* splitting_pointer_;
- // greedy: the number of LifetimePositions covered by this range. Used to
- // prioritize selecting live ranges for register assignment, as well as
- // in weight calculations.
- int size_;
-
- // greedy: a metric for resolving conflicts between ranges with an assigned
- // register and ranges that intersect them and need a register.
- float weight_;
-
- // greedy: groupping
- LiveRangeGroup* group_;
DISALLOW_COPY_AND_ASSIGN(LiveRange);
};
@@ -483,7 +462,6 @@ class LiveRangeGroup final : public ZoneObject {
ZoneVector<LiveRange*>& ranges() { return ranges_; }
const ZoneVector<LiveRange*>& ranges() const { return ranges_; }
- // TODO(mtrofin): populate assigned register and use in weight calculation.
int assigned_register() const { return assigned_register_; }
void set_assigned_register(int reg) { assigned_register_ = reg; }
« 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