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

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

Issue 1612013002: Revert of [turbofan] optimize spills in defered blocks (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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/live-range-separator.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 38fad05ed327a171edc2a911badf5202b93433b8..b96a43ccec4431606bee4719bb76383088db85e4 100644
--- a/src/compiler/register-allocator.h
+++ b/src/compiler/register-allocator.h
@@ -579,17 +579,14 @@
// and instead let the LiveRangeConnector perform the spills within the
// deferred blocks. If so, we insert here spills for non-spilled ranges
// with slot use positions.
- void TreatAsSpilledInDeferredBlock(Zone* zone, int total_block_count) {
+ void MarkSpilledInDeferredBlock() {
spill_start_index_ = -1;
spilled_in_deferred_blocks_ = true;
spill_move_insertion_locations_ = nullptr;
- list_of_blocks_requiring_spill_operands_ =
- new (zone) BitVector(total_block_count, zone);
- }
-
- void CommitSpillInDeferredBlocks(RegisterAllocationData* data,
- const InstructionOperand& spill_operand,
- BitVector* necessary_spill_points);
+ }
+
+ bool TryCommitSpillInDeferredBlock(InstructionSequence* code,
+ const InstructionOperand& spill_operand);
TopLevelLiveRange* splintered_from() const { return splintered_from_; }
bool IsSplinter() const { return splintered_from_ != nullptr; }
@@ -620,8 +617,7 @@
struct SpillMoveInsertionList;
- SpillMoveInsertionList* GetSpillMoveInsertionLocations() const {
- DCHECK(!IsSpilledOnlyInDeferredBlocks());
+ SpillMoveInsertionList* spill_move_insertion_locations() const {
return spill_move_insertion_locations_;
}
TopLevelLiveRange* splinter() const { return splinter_; }
@@ -637,16 +633,6 @@
void MarkHasPreassignedSlot() { has_preassigned_slot_ = true; }
bool has_preassigned_slot() const { return has_preassigned_slot_; }
-
- void AddBlockRequiringSpillOperand(RpoNumber block_id) {
- DCHECK(IsSpilledOnlyInDeferredBlocks());
- GetListOfBlocksRequiringSpillOperands()->Add(block_id.ToInt());
- }
-
- BitVector* GetListOfBlocksRequiringSpillOperands() const {
- DCHECK(IsSpilledOnlyInDeferredBlocks());
- return list_of_blocks_requiring_spill_operands_;
- }
private:
void SetSplinteredFrom(TopLevelLiveRange* splinter_parent);
@@ -664,12 +650,7 @@
InstructionOperand* spill_operand_;
SpillRange* spill_range_;
};
-
- union {
- SpillMoveInsertionList* spill_move_insertion_locations_;
- BitVector* list_of_blocks_requiring_spill_operands_;
- };
-
+ SpillMoveInsertionList* spill_move_insertion_locations_;
// TODO(mtrofin): generalize spilling after definition, currently specialized
// just for spill in a single deferred block.
bool spilled_in_deferred_blocks_;
@@ -1144,7 +1125,6 @@
};
-class LiveRangeBoundArray;
// Insert moves of the form
//
// Operand(child_(k+1)) = Operand(child_k)
@@ -1177,10 +1157,6 @@
const InstructionBlock* pred,
const InstructionOperand& pred_op);
- void CommitSpillsInDeferredBlocks(TopLevelLiveRange* range,
- LiveRangeBoundArray* array,
- Zone* temp_zone);
-
RegisterAllocationData* const data_;
DISALLOW_COPY_AND_ASSIGN(LiveRangeConnector);
« no previous file with comments | « src/compiler/live-range-separator.cc ('k') | src/compiler/register-allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698