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

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

Issue 1119683002: Mark instruction blocks with spills (for frame elision). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Improved printing of blocks Created 5 years, 8 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/register-allocator.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/register-allocator.cc
diff --git a/src/compiler/register-allocator.cc b/src/compiler/register-allocator.cc
index 7b2caff60ce993125c3c877c3e92b2bd6a5ddc29..eb7b6b90d32d7048d3bfd0034145eb183ccd6732 100644
--- a/src/compiler/register-allocator.cc
+++ b/src/compiler/register-allocator.cc
@@ -2690,6 +2690,25 @@ bool GreedyAllocator::AllocateBlockedRange(
}
+SpillSlotLocator::SpillSlotLocator(RegisterAllocationData* data)
+ : data_(data) {}
+
+
+void SpillSlotLocator::LocateSpillSlots() {
+ auto code = data()->code();
+ for (auto range : data()->live_ranges()) {
+ if (range == nullptr || range->IsEmpty() || range->IsChild()) continue;
+ // We care only about ranges which spill in the frame.
+ if (!range->HasSpillRange()) continue;
+ auto spills = range->spills_at_definition();
+ DCHECK_NOT_NULL(spills);
+ for (; spills != nullptr; spills = spills->next) {
+ code->GetInstructionBlock(spills->gap_index)->mark_needs_frame();
+ }
+ }
+}
+
+
OperandAssigner::OperandAssigner(RegisterAllocationData* data) : data_(data) {}
« no previous file with comments | « src/compiler/register-allocator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698