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

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

Issue 1426583002: [turbofan] Centralize splitting for memory operands. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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/greedy-allocator.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 caac610b4d38c28018320dd92646c0e118e17b40..a7a1f0073bd333f479f8f95c0d04470481c0822e 100644
--- a/src/compiler/register-allocator.h
+++ b/src/compiler/register-allocator.h
@@ -562,6 +562,10 @@ class TopLevelLiveRange final : public LiveRange {
void UpdateSpillRangePostMerge(TopLevelLiveRange* merged);
int vreg() const { return vreg_; }
+#if DEBUG
+ int debug_virt_reg() const;
+#endif
+
int GetNextChildId() {
return IsSplinter() ? splintered_from()->GetNextChildId()
: ++last_child_id_;
@@ -909,8 +913,16 @@ class RegisterAllocator : public ZoneObject {
return allocatable_register_codes_[allocatable_index];
}
+ // TODO(mtrofin): explain why splitting in gap START is always OK.
+ LifetimePosition GetSplitPositionForInstruction(const LiveRange* range,
+ int instruction_index);
+
Zone* allocation_zone() const { return data()->allocation_zone(); }
+ // Find the optimal split for ranges defined by a memory operand, e.g.
+ // constants or function parameters passed on the stack.
+ void SplitAndSpillRangesDefinedByMemoryOperand();
+
// Split the given range at the given position.
// If range starts at or after the given position then the
// original range is returned.
@@ -919,6 +931,11 @@ class RegisterAllocator : public ZoneObject {
// still be owned by the original range after splitting.
LiveRange* SplitRangeAt(LiveRange* range, LifetimePosition pos);
+ bool CanProcessRange(LiveRange* range) const {
+ return range != nullptr && !range->IsEmpty() && range->kind() == mode();
+ }
+
+
// Split the given range in a position from the interval [start, end].
LiveRange* SplitBetween(LiveRange* range, LifetimePosition start,
LifetimePosition end);
« no previous file with comments | « src/compiler/greedy-allocator.cc ('k') | src/compiler/register-allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698