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

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

Issue 1513543003: [turbofan] Make MachineType a pair of enums. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Moar rebase Created 5 years 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/raw-machine-assembler.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 9032fde224ec8175e1217a71eefa9cdfcf34cb0c..a5d46b058d72146f3707f586e686b724f9e2bd9f 100644
--- a/src/compiler/register-allocator.h
+++ b/src/compiler/register-allocator.h
@@ -315,7 +315,9 @@ class LiveRange : public ZoneObject {
InstructionOperand GetAssignedOperand() const;
- MachineType machine_type() const { return MachineTypeField::decode(bits_); }
+ MachineRepresentation representation() const {
+ return RepresentationField::decode(bits_);
+ }
int assigned_register() const { return AssignedRegisterField::decode(bits_); }
bool HasRegisterAssigned() const {
@@ -414,7 +416,7 @@ class LiveRange : public ZoneObject {
private:
friend class TopLevelLiveRange;
- explicit LiveRange(int relative_id, MachineType machine_type,
+ explicit LiveRange(int relative_id, MachineRepresentation rep,
TopLevelLiveRange* top_level);
void AppendAsChild(TopLevelLiveRange* other);
@@ -428,7 +430,7 @@ class LiveRange : public ZoneObject {
typedef BitField<bool, 0, 1> SpilledField;
typedef BitField<int32_t, 6, 6> AssignedRegisterField;
- typedef BitField<MachineType, 12, 15> MachineTypeField;
+ typedef BitField<MachineRepresentation, 12, 15> RepresentationField;
// Unique among children and splinters of the same virtual register.
int relative_id_;
@@ -481,7 +483,7 @@ class LiveRangeGroup final : public ZoneObject {
class TopLevelLiveRange final : public LiveRange {
public:
- explicit TopLevelLiveRange(int vreg, MachineType machine_type);
+ explicit TopLevelLiveRange(int vreg, MachineRepresentation rep);
int spill_start_index() const { return spill_start_index_; }
bool IsFixed() const { return vreg_ < 0; }
@@ -773,12 +775,12 @@ class RegisterAllocationData final : public ZoneObject {
const char* debug_name() const { return debug_name_; }
const RegisterConfiguration* config() const { return config_; }
- MachineType MachineTypeFor(int virtual_register);
+ MachineRepresentation RepresentationFor(int virtual_register);
TopLevelLiveRange* GetOrCreateLiveRangeFor(int index);
// Creates a new live range.
- TopLevelLiveRange* NewLiveRange(int index, MachineType machine_type);
- TopLevelLiveRange* NextLiveRange(MachineType machine_type);
+ TopLevelLiveRange* NewLiveRange(int index, MachineRepresentation rep);
+ TopLevelLiveRange* NextLiveRange(MachineRepresentation rep);
SpillRange* AssignSpillRangeToLiveRange(TopLevelLiveRange* range);
SpillRange* CreateSpillRangeForLiveRange(TopLevelLiveRange* range);
« no previous file with comments | « src/compiler/raw-machine-assembler.cc ('k') | src/compiler/register-allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698