v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::internal::compiler::TopLevelLiveRange Class Referencefinal

#include <register-allocator.h>

Inheritance diagram for v8::internal::compiler::TopLevelLiveRange:
Collaboration diagram for v8::internal::compiler::TopLevelLiveRange:

Classes

struct  SpillMoveInsertionList
 

Public Types

enum  SlotUseKind { kNoSlotUse , kDeferredSlotUse , kGeneralSlotUse }
 
enum class  SpillType { kNoSpillType , kSpillOperand , kSpillRange , kDeferredSpillRange }
 

Public Member Functions

 TopLevelLiveRange (int vreg, MachineRepresentation rep, Zone *zone)
 
 TopLevelLiveRange (const TopLevelLiveRange &)=delete
 
TopLevelLiveRangeoperator= (const TopLevelLiveRange &)=delete
 
int spill_start_index () const
 
bool IsFixed () const
 
bool IsDeferredFixed () const
 
void set_deferred_fixed ()
 
bool is_phi () const
 
void set_is_phi (bool value)
 
bool is_non_loop_phi () const
 
bool is_loop_phi () const
 
void set_is_non_loop_phi (bool value)
 
bool SpillAtLoopHeaderNotBeneficial () const
 
void set_spilling_at_loop_header_not_beneficial ()
 
bool has_slot_use () const
 
bool has_non_deferred_slot_use () const
 
void reset_slot_use ()
 
void register_slot_use (SlotUseKind value)
 
SlotUseKind slot_use_kind () const
 
void EnsureInterval (LifetimePosition start, LifetimePosition end, Zone *zone)
 
void AddUseInterval (LifetimePosition start, LifetimePosition end, Zone *zone)
 
void AddUsePosition (UsePosition *pos, Zone *zone)
 
void ShortenTo (LifetimePosition start)
 
void SetSpillRange (SpillRange *spill_range)
 
void set_spill_type (SpillType value)
 
SpillType spill_type () const
 
InstructionOperandGetSpillOperand () const
 
SpillRangeGetAllocatedSpillRange () const
 
SpillRangeGetSpillRange () const
 
bool HasNoSpillType () const
 
bool HasSpillOperand () const
 
bool HasSpillRange () const
 
bool HasGeneralSpillRange () const
 
AllocatedOperand GetSpillRangeOperand () const
 
void RecordSpillLocation (Zone *zone, int gap_index, InstructionOperand *operand)
 
void SetSpillOperand (InstructionOperand *operand)
 
void SetSpillStartIndex (int start)
 
void FilterSpillMoves (RegisterAllocationData *data, const InstructionOperand &operand)
 
void CommitSpillMoves (RegisterAllocationData *data, const InstructionOperand &operand)
 
void TreatAsSpilledInDeferredBlock (Zone *zone)
 
void TransitionRangeToDeferredSpill (Zone *zone)
 
void TransitionRangeToSpillAtDefinition ()
 
bool MayRequireSpillRange () const
 
void UpdateSpillRangePostMerge (TopLevelLiveRange *merged)
 
int vreg () const
 
LiveRangeGetChildCovers (LifetimePosition pos)
 
const ZoneVector< LiveRange * > & Children () const
 
int GetNextChildId ()
 
bool IsSpilledOnlyInDeferredBlocks (const RegisterAllocationData *data) const
 
SpillMoveInsertionListGetSpillMoveInsertionLocations (const RegisterAllocationData *data) const
 
void MarkHasPreassignedSlot ()
 
bool has_preassigned_slot () const
 
void SetLateSpillingSelected (bool late_spilling_selected)
 
bool LateSpillingSelected () const
 
void AddBlockRequiringSpillOperand (RpoNumber block_id, const RegisterAllocationData *data)
 
SparseBitVectorGetListOfBlocksRequiringSpillOperands (const RegisterAllocationData *data) const
 
LiveRangeBundleget_bundle () const
 
void set_bundle (LiveRangeBundle *bundle)
 
- Public Member Functions inherited from v8::internal::compiler::LiveRange
 LiveRange (const LiveRange &)=delete
 
LiveRangeoperator= (const LiveRange &)=delete
 
const UseIntervalVectorintervals () const
 
base::Vector< UsePosition * > positions () const
 
TopLevelLiveRangeTopLevel ()
 
const TopLevelLiveRangeTopLevel () const
 
bool IsTopLevel () const
 
LiveRangenext () const
 
int relative_id () const
 
bool IsEmpty () const
 
InstructionOperand GetAssignedOperand () const
 
MachineRepresentation representation () const
 
int assigned_register () const
 
bool HasRegisterAssigned () const
 
void set_assigned_register (int reg)
 
void UnsetAssignedRegister ()
 
bool ShouldRecombine () const
 
void SetRecombine ()
 
void set_controlflow_hint (int reg)
 
int controlflow_hint () const
 
bool RegisterFromControlFlow (int *reg)
 
bool spilled () const
 
void AttachToNext (Zone *zone)
 
void Unspill ()
 
void Spill ()
 
RegisterKind kind () const
 
UsePosition *const * NextUsePosition (LifetimePosition start) const
 
UsePositionNextRegisterPosition (LifetimePosition start) const
 
UsePositionNextUsePositionRegisterIsBeneficial (LifetimePosition start) const
 
LifetimePosition NextLifetimePositionRegisterIsBeneficial (const LifetimePosition &start) const
 
UsePositionNextUsePositionSpillDetrimental (LifetimePosition start) const
 
bool CanBeSpilled (LifetimePosition pos) const
 
LiveRangeSplitAt (LifetimePosition position, Zone *zone)
 
bool RegisterFromFirstHint (int *register_index)
 
UsePositioncurrent_hint_position () const
 
LifetimePosition Start () const
 
LifetimePosition End () const
 
bool ShouldBeAllocatedBefore (const LiveRange *other) const
 
bool CanCover (LifetimePosition position) const
 
bool Covers (LifetimePosition position)
 
LifetimePosition NextStartAfter (LifetimePosition position)
 
LifetimePosition NextEndAfter (LifetimePosition position)
 
LifetimePosition FirstIntersection (LiveRange *other)
 
LifetimePosition NextStart () const
 
void ConvertUsesToOperand (const InstructionOperand &op, const InstructionOperand &spill_op)
 
void SetUseHints (int register_index)
 
void UnsetUseHints ()
 
void ResetCurrentHintPosition ()
 
void Print (const RegisterConfiguration *config, bool with_children) const
 
void Print (bool with_children) const
 
bool RegisterFromBundle (int *hint) const
 
void UpdateBundleRegister (int reg) const
 

Private Types

enum class  SpillRangeMode : uint8_t { kNotSet , kSpillAtDefinition , kSpillLater }
 
using HasSlotUseField = base::BitField<SlotUseKind, 1, 2>
 
using IsPhiField = base::BitField<bool, 3, 1>
 
using IsNonLoopPhiField = base::BitField<bool, 4, 1>
 
using SpillTypeField = base::BitField<SpillType, 5, 2>
 
using DeferredFixedField = base::BitField<bool, 28, 1>
 
using SpillAtLoopHeaderNotBeneficialField = base::BitField<bool, 29, 1>
 
using SpillRangeModeField = base::BitField<SpillRangeMode, 30, 2>
 

Private Attributes

int vreg_
 
int last_child_id_
 
union { 
 
   InstructionOperand *   spill_operand_ 
 
   SpillRange *   spill_range_ 
 
};  
 
union { 
 
   SpillMoveInsertionList *   spill_move_insertion_locations_ 
 
   SparseBitVector *   list_of_blocks_requiring_spill_operands_ 
 
};  
 
LiveRangeBundlebundle_ = nullptr
 
UsePositionVector positions_
 
ZoneVector< LiveRange * > children_
 
bool spilled_in_deferred_blocks_
 
bool has_preassigned_slot_
 
int spill_start_index_
 

Friends

class LiveRange
 

Detailed Description

Definition at line 1016 of file register-allocator.h.

Member Typedef Documentation

◆ DeferredFixedField

◆ HasSlotUseField

◆ IsNonLoopPhiField

◆ IsPhiField

◆ SpillAtLoopHeaderNotBeneficialField

◆ SpillRangeModeField

◆ SpillTypeField

Member Enumeration Documentation

◆ SlotUseKind

Enumerator
kNoSlotUse 
kDeferredSlotUse 
kGeneralSlotUse 

Definition at line 1043 of file register-allocator.h.

◆ SpillRangeMode

Enumerator
kNotSet 
kSpillAtDefinition 
kSpillLater 

Definition at line 1241 of file register-allocator.h.

◆ SpillType

Enumerator
kNoSpillType 
kSpillOperand 
kSpillRange 
kDeferredSpillRange 

Definition at line 1085 of file register-allocator.h.

Constructor & Destructor Documentation

◆ TopLevelLiveRange() [1/2]

v8::internal::compiler::TopLevelLiveRange::TopLevelLiveRange ( int vreg,
MachineRepresentation rep,
Zone * zone )
explicit

Definition at line 688 of file register-allocator.cc.

◆ TopLevelLiveRange() [2/2]

v8::internal::compiler::TopLevelLiveRange::TopLevelLiveRange ( const TopLevelLiveRange & )
delete

Member Function Documentation

◆ AddBlockRequiringSpillOperand()

void v8::internal::compiler::TopLevelLiveRange::AddBlockRequiringSpillOperand ( RpoNumber block_id,
const RegisterAllocationData * data )
inline

Definition at line 1221 of file register-allocator.h.

Here is the call graph for this function:

◆ AddUseInterval()

void v8::internal::compiler::TopLevelLiveRange::AddUseInterval ( LifetimePosition start,
LifetimePosition end,
Zone * zone )

Definition at line 860 of file register-allocator.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AddUsePosition()

void v8::internal::compiler::TopLevelLiveRange::AddUsePosition ( UsePosition * pos,
Zone * zone )

Definition at line 895 of file register-allocator.cc.

Here is the call graph for this function:

◆ Children()

const ZoneVector< LiveRange * > & v8::internal::compiler::TopLevelLiveRange::Children ( ) const
inline

Definition at line 1182 of file register-allocator.h.

◆ CommitSpillMoves()

void v8::internal::compiler::TopLevelLiveRange::CommitSpillMoves ( RegisterAllocationData * data,
const InstructionOperand & operand )

Definition at line 709 of file register-allocator.cc.

Here is the call graph for this function:

◆ EnsureInterval()

void v8::internal::compiler::TopLevelLiveRange::EnsureInterval ( LifetimePosition start,
LifetimePosition end,
Zone * zone )

Definition at line 836 of file register-allocator.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FilterSpillMoves()

void v8::internal::compiler::TopLevelLiveRange::FilterSpillMoves ( RegisterAllocationData * data,
const InstructionOperand & operand )

Definition at line 731 of file register-allocator.cc.

Here is the call graph for this function:

◆ get_bundle()

LiveRangeBundle * v8::internal::compiler::TopLevelLiveRange::get_bundle ( ) const
inline

Definition at line 1233 of file register-allocator.h.

Here is the caller graph for this function:

◆ GetAllocatedSpillRange()

SpillRange * v8::internal::compiler::TopLevelLiveRange::GetAllocatedSpillRange ( ) const
inline

Definition at line 1100 of file register-allocator.h.

◆ GetChildCovers()

LiveRange * v8::internal::compiler::TopLevelLiveRange::GetChildCovers ( LifetimePosition pos)

Definition at line 790 of file register-allocator.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetListOfBlocksRequiringSpillOperands()

SparseBitVector * v8::internal::compiler::TopLevelLiveRange::GetListOfBlocksRequiringSpillOperands ( const RegisterAllocationData * data) const
inline

Definition at line 1227 of file register-allocator.h.

Here is the caller graph for this function:

◆ GetNextChildId()

int v8::internal::compiler::TopLevelLiveRange::GetNextChildId ( )
inline

Definition at line 1184 of file register-allocator.h.

Here is the caller graph for this function:

◆ GetSpillMoveInsertionLocations()

SpillMoveInsertionList * v8::internal::compiler::TopLevelLiveRange::GetSpillMoveInsertionLocations ( const RegisterAllocationData * data) const
inline

Definition at line 1192 of file register-allocator.h.

Here is the caller graph for this function:

◆ GetSpillOperand()

InstructionOperand * v8::internal::compiler::TopLevelLiveRange::GetSpillOperand ( ) const
inline

Definition at line 1095 of file register-allocator.h.

Here is the caller graph for this function:

◆ GetSpillRange()

SpillRange * v8::internal::compiler::TopLevelLiveRange::GetSpillRange ( ) const
inline

Definition at line 1105 of file register-allocator.h.

Here is the caller graph for this function:

◆ GetSpillRangeOperand()

AllocatedOperand v8::internal::compiler::TopLevelLiveRange::GetSpillRangeOperand ( ) const

Definition at line 784 of file register-allocator.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ has_non_deferred_slot_use()

bool v8::internal::compiler::TopLevelLiveRange::has_non_deferred_slot_use ( ) const
inline

Definition at line 1049 of file register-allocator.h.

◆ has_preassigned_slot()

bool v8::internal::compiler::TopLevelLiveRange::has_preassigned_slot ( ) const
inline

Definition at line 1199 of file register-allocator.h.

Here is the caller graph for this function:

◆ has_slot_use()

bool v8::internal::compiler::TopLevelLiveRange::has_slot_use ( ) const
inline

Definition at line 1045 of file register-allocator.h.

Here is the caller graph for this function:

◆ HasGeneralSpillRange()

bool v8::internal::compiler::TopLevelLiveRange::HasGeneralSpillRange ( ) const
inline

Definition at line 1116 of file register-allocator.h.

Here is the caller graph for this function:

◆ HasNoSpillType()

bool v8::internal::compiler::TopLevelLiveRange::HasNoSpillType ( ) const
inline

Definition at line 1109 of file register-allocator.h.

Here is the caller graph for this function:

◆ HasSpillOperand()

bool v8::internal::compiler::TopLevelLiveRange::HasSpillOperand ( ) const
inline

Definition at line 1112 of file register-allocator.h.

Here is the caller graph for this function:

◆ HasSpillRange()

bool v8::internal::compiler::TopLevelLiveRange::HasSpillRange ( ) const
inline

Definition at line 1115 of file register-allocator.h.

Here is the caller graph for this function:

◆ is_loop_phi()

bool v8::internal::compiler::TopLevelLiveRange::is_loop_phi ( ) const
inline

Definition at line 1032 of file register-allocator.h.

◆ is_non_loop_phi()

bool v8::internal::compiler::TopLevelLiveRange::is_non_loop_phi ( ) const
inline

Definition at line 1031 of file register-allocator.h.

Here is the caller graph for this function:

◆ is_phi()

bool v8::internal::compiler::TopLevelLiveRange::is_phi ( ) const
inline

Definition at line 1028 of file register-allocator.h.

Here is the caller graph for this function:

◆ IsDeferredFixed()

bool v8::internal::compiler::TopLevelLiveRange::IsDeferredFixed ( ) const
inline

Definition at line 1026 of file register-allocator.h.

◆ IsFixed()

bool v8::internal::compiler::TopLevelLiveRange::IsFixed ( ) const
inline

Definition at line 1024 of file register-allocator.h.

Here is the caller graph for this function:

◆ IsSpilledOnlyInDeferredBlocks()

bool v8::internal::compiler::TopLevelLiveRange::IsSpilledOnlyInDeferredBlocks ( const RegisterAllocationData * data) const
inline

Definition at line 1186 of file register-allocator.h.

Here is the caller graph for this function:

◆ LateSpillingSelected()

bool v8::internal::compiler::TopLevelLiveRange::LateSpillingSelected ( ) const
inline

Definition at line 1214 of file register-allocator.h.

◆ MarkHasPreassignedSlot()

void v8::internal::compiler::TopLevelLiveRange::MarkHasPreassignedSlot ( )
inline

Definition at line 1198 of file register-allocator.h.

◆ MayRequireSpillRange()

bool v8::internal::compiler::TopLevelLiveRange::MayRequireSpillRange ( ) const
inline

Definition at line 1167 of file register-allocator.h.

◆ operator=()

TopLevelLiveRange & v8::internal::compiler::TopLevelLiveRange::operator= ( const TopLevelLiveRange & )
delete

◆ RecordSpillLocation()

void v8::internal::compiler::TopLevelLiveRange::RecordSpillLocation ( Zone * zone,
int gap_index,
InstructionOperand * operand )

Definition at line 702 of file register-allocator.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ register_slot_use()

void v8::internal::compiler::TopLevelLiveRange::register_slot_use ( SlotUseKind value)
inline

Definition at line 1056 of file register-allocator.h.

Here is the caller graph for this function:

◆ reset_slot_use()

void v8::internal::compiler::TopLevelLiveRange::reset_slot_use ( )
inline

Definition at line 1053 of file register-allocator.h.

◆ set_bundle()

void v8::internal::compiler::TopLevelLiveRange::set_bundle ( LiveRangeBundle * bundle)
inline

Definition at line 1234 of file register-allocator.h.

◆ set_deferred_fixed()

void v8::internal::compiler::TopLevelLiveRange::set_deferred_fixed ( )
inline

Definition at line 1027 of file register-allocator.h.

◆ set_is_non_loop_phi()

void v8::internal::compiler::TopLevelLiveRange::set_is_non_loop_phi ( bool value)
inline

Definition at line 1033 of file register-allocator.h.

Here is the caller graph for this function:

◆ set_is_phi()

void v8::internal::compiler::TopLevelLiveRange::set_is_phi ( bool value)
inline

Definition at line 1029 of file register-allocator.h.

Here is the caller graph for this function:

◆ set_spill_type()

void v8::internal::compiler::TopLevelLiveRange::set_spill_type ( SpillType value)
inline

Definition at line 1091 of file register-allocator.h.

Here is the caller graph for this function:

◆ set_spilling_at_loop_header_not_beneficial()

void v8::internal::compiler::TopLevelLiveRange::set_spilling_at_loop_header_not_beneficial ( )
inline

Definition at line 1039 of file register-allocator.h.

Here is the caller graph for this function:

◆ SetLateSpillingSelected()

void v8::internal::compiler::TopLevelLiveRange::SetLateSpillingSelected ( bool late_spilling_selected)
inline

Definition at line 1204 of file register-allocator.h.

Here is the caller graph for this function:

◆ SetSpillOperand()

void v8::internal::compiler::TopLevelLiveRange::SetSpillOperand ( InstructionOperand * operand)

Definition at line 771 of file register-allocator.cc.

Here is the call graph for this function:

◆ SetSpillRange()

void v8::internal::compiler::TopLevelLiveRange::SetSpillRange ( SpillRange * spill_range)

Definition at line 778 of file register-allocator.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetSpillStartIndex()

void v8::internal::compiler::TopLevelLiveRange::SetSpillStartIndex ( int start)
inline

Definition at line 1124 of file register-allocator.h.

Here is the caller graph for this function:

◆ ShortenTo()

void v8::internal::compiler::TopLevelLiveRange::ShortenTo ( LifetimePosition start)

Definition at line 828 of file register-allocator.cc.

Here is the call graph for this function:

◆ slot_use_kind()

SlotUseKind v8::internal::compiler::TopLevelLiveRange::slot_use_kind ( ) const
inline

Definition at line 1059 of file register-allocator.h.

◆ spill_start_index()

int v8::internal::compiler::TopLevelLiveRange::spill_start_index ( ) const
inline

Definition at line 1022 of file register-allocator.h.

◆ spill_type()

SpillType v8::internal::compiler::TopLevelLiveRange::spill_type ( ) const
inline

Definition at line 1094 of file register-allocator.h.

Here is the caller graph for this function:

◆ SpillAtLoopHeaderNotBeneficial()

bool v8::internal::compiler::TopLevelLiveRange::SpillAtLoopHeaderNotBeneficial ( ) const
inline

Definition at line 1036 of file register-allocator.h.

◆ TransitionRangeToDeferredSpill()

void v8::internal::compiler::TopLevelLiveRange::TransitionRangeToDeferredSpill ( Zone * zone)
inline

Definition at line 1152 of file register-allocator.h.

Here is the call graph for this function:

◆ TransitionRangeToSpillAtDefinition()

void v8::internal::compiler::TopLevelLiveRange::TransitionRangeToSpillAtDefinition ( )
inline

Definition at line 1160 of file register-allocator.h.

◆ TreatAsSpilledInDeferredBlock()

void v8::internal::compiler::TopLevelLiveRange::TreatAsSpilledInDeferredBlock ( Zone * zone)
inline

Definition at line 1143 of file register-allocator.h.

Here is the call graph for this function:

◆ UpdateSpillRangePostMerge()

void v8::internal::compiler::TopLevelLiveRange::UpdateSpillRangePostMerge ( TopLevelLiveRange * merged)

◆ vreg()

int v8::internal::compiler::TopLevelLiveRange::vreg ( ) const
inline

Definition at line 1171 of file register-allocator.h.

Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ LiveRange

friend class LiveRange
friend

Definition at line 1237 of file register-allocator.h.

Member Data Documentation

◆ [union]

◆ [union]

◆ bundle_

LiveRangeBundle* v8::internal::compiler::TopLevelLiveRange::bundle_ = nullptr
private

Definition at line 1268 of file register-allocator.h.

◆ children_

ZoneVector<LiveRange*> v8::internal::compiler::TopLevelLiveRange::children_
private

Definition at line 1274 of file register-allocator.h.

◆ has_preassigned_slot_

bool v8::internal::compiler::TopLevelLiveRange::has_preassigned_slot_
private

Definition at line 1279 of file register-allocator.h.

◆ last_child_id_

int v8::internal::compiler::TopLevelLiveRange::last_child_id_
private

Definition at line 1256 of file register-allocator.h.

◆ list_of_blocks_requiring_spill_operands_

SparseBitVector* v8::internal::compiler::TopLevelLiveRange::list_of_blocks_requiring_spill_operands_

Definition at line 1265 of file register-allocator.h.

◆ positions_

UsePositionVector v8::internal::compiler::TopLevelLiveRange::positions_
private

Definition at line 1270 of file register-allocator.h.

◆ spill_move_insertion_locations_

SpillMoveInsertionList* v8::internal::compiler::TopLevelLiveRange::spill_move_insertion_locations_

Definition at line 1264 of file register-allocator.h.

◆ spill_operand_

InstructionOperand* v8::internal::compiler::TopLevelLiveRange::spill_operand_

Definition at line 1259 of file register-allocator.h.

◆ spill_range_

SpillRange* v8::internal::compiler::TopLevelLiveRange::spill_range_

Definition at line 1260 of file register-allocator.h.

◆ spill_start_index_

int v8::internal::compiler::TopLevelLiveRange::spill_start_index_
private

Definition at line 1281 of file register-allocator.h.

◆ spilled_in_deferred_blocks_

bool v8::internal::compiler::TopLevelLiveRange::spilled_in_deferred_blocks_
private

Definition at line 1278 of file register-allocator.h.

◆ vreg_

int v8::internal::compiler::TopLevelLiveRange::vreg_
private

Definition at line 1255 of file register-allocator.h.


The documentation for this class was generated from the following files: