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

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

Issue 1810333003: [turbofan] Move frame elision logic to the end (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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') | 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 cccf967227e8be2b2c77ad090a5cf233884991a2..4efa63d3835702189a4ddeb1110fcd50f6f1718d 100644
--- a/src/compiler/register-allocator.cc
+++ b/src/compiler/register-allocator.cc
@@ -3162,21 +3162,14 @@ void SpillSlotLocator::LocateSpillSlots() {
for (TopLevelLiveRange* range : data()->live_ranges()) {
if (range == nullptr || range->IsEmpty()) continue;
// We care only about ranges which spill in the frame.
- if (!range->HasSpillRange()) continue;
- if (range->IsSpilledOnlyInDeferredBlocks()) {
- for (LiveRange* child = range; child != nullptr; child = child->next()) {
- if (child->spilled()) {
- code->GetInstructionBlock(child->Start().ToInstructionIndex())
- ->mark_needs_frame();
- }
- }
- } else {
- TopLevelLiveRange::SpillMoveInsertionList* spills =
- range->GetSpillMoveInsertionLocations();
- DCHECK_NOT_NULL(spills);
- for (; spills != nullptr; spills = spills->next) {
- code->GetInstructionBlock(spills->gap_index)->mark_needs_frame();
- }
+ if (!range->HasSpillRange() || range->IsSpilledOnlyInDeferredBlocks()) {
+ continue;
+ }
+ TopLevelLiveRange::SpillMoveInsertionList* spills =
+ range->GetSpillMoveInsertionLocations();
+ DCHECK_NOT_NULL(spills);
+ for (; spills != nullptr; spills = spills->next) {
+ code->GetInstructionBlock(spills->gap_index)->mark_needs_frame();
}
}
}
@@ -3639,7 +3632,7 @@ void LiveRangeConnector::CommitSpillsInDeferredBlocks(
worklist.pop();
if (done_blocks.Contains(block_id)) continue;
done_blocks.Add(block_id);
- const InstructionBlock* spill_block =
+ InstructionBlock* spill_block =
code->InstructionBlockAt(RpoNumber::FromInt(block_id));
for (const RpoNumber& pred : spill_block->predecessors()) {
@@ -3659,6 +3652,7 @@ void LiveRangeConnector::CommitSpillsInDeferredBlocks(
data()->AddGapMove(spill_block->first_instruction_index(),
Instruction::GapPosition::START, pred_op,
spill_operand);
+ spill_block->mark_needs_frame();
}
}
}
« no previous file with comments | « src/compiler/pipeline.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698