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

#include <register-allocator.h>

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

Public Member Functions

 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

using SpilledField = base::BitField<bool, 0, 1>
 
using AssignedRegisterField = base::BitField<int32_t, 7, 6>
 
using RepresentationField = base::BitField<MachineRepresentation, 13, 8>
 
using RecombineField = base::BitField<bool, 21, 1>
 
using ControlFlowRegisterHint = base::BitField<uint8_t, 22, 6>
 

Private Member Functions

 LiveRange (int relative_id, MachineRepresentation rep, TopLevelLiveRange *top_level)
 
void set_spilled (bool value)
 
UseIntervalVector::iterator FirstSearchIntervalForPosition (LifetimePosition position)
 
void AdvanceLastProcessedMarker (UseIntervalVector::iterator to_start_of, LifetimePosition but_not_past)
 

Private Attributes

friend Zone
 
int relative_id_
 
uint32_t bits_
 
UseIntervalVector intervals_
 
base::Vector< UsePosition * > positions_span_
 
TopLevelLiveRangetop_level_
 
LiveRangenext_
 
UseIntervalVector::iterator current_interval_
 
size_t current_hint_position_index_ = 0
 
LifetimePosition next_start_
 
LifetimePosition start_
 
LifetimePosition end_
 

Friends

class TopLevelLiveRange
 

Detailed Description

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

Member Typedef Documentation

◆ AssignedRegisterField

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

◆ ControlFlowRegisterHint

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

◆ RecombineField

◆ RepresentationField

◆ SpilledField

Constructor & Destructor Documentation

◆ LiveRange() [1/2]

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

◆ LiveRange() [2/2]

v8::internal::compiler::LiveRange::LiveRange ( int relative_id,
MachineRepresentation rep,
TopLevelLiveRange * top_level )
explicitprivate

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

Here is the call graph for this function:

Member Function Documentation

◆ AdvanceLastProcessedMarker()

void v8::internal::compiler::LiveRange::AdvanceLastProcessedMarker ( UseIntervalVector::iterator to_start_of,
LifetimePosition but_not_past )
private

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

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

◆ assigned_register()

int v8::internal::compiler::LiveRange::assigned_register ( ) const
inline

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

Here is the caller graph for this function:

◆ AttachToNext()

void v8::internal::compiler::LiveRange::AttachToNext ( Zone * zone)

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

Here is the call graph for this function:

◆ CanBeSpilled()

bool v8::internal::compiler::LiveRange::CanBeSpilled ( LifetimePosition pos) const

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

Here is the call graph for this function:

◆ CanCover()

bool v8::internal::compiler::LiveRange::CanCover ( LifetimePosition position) const

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

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

◆ controlflow_hint()

int v8::internal::compiler::LiveRange::controlflow_hint ( ) const
inline

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

Here is the caller graph for this function:

◆ ConvertUsesToOperand()

void v8::internal::compiler::LiveRange::ConvertUsesToOperand ( const InstructionOperand & op,
const InstructionOperand & spill_op )

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

Here is the call graph for this function:

◆ Covers()

bool v8::internal::compiler::LiveRange::Covers ( LifetimePosition position)

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

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

◆ current_hint_position()

UsePosition * v8::internal::compiler::LiveRange::current_hint_position ( ) const
inline

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

Here is the caller graph for this function:

◆ End()

LifetimePosition v8::internal::compiler::LiveRange::End ( ) const
inline

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

Here is the caller graph for this function:

◆ FirstIntersection()

LifetimePosition v8::internal::compiler::LiveRange::FirstIntersection ( LiveRange * other)

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

Here is the call graph for this function:

◆ FirstSearchIntervalForPosition()

UseIntervalVector::iterator v8::internal::compiler::LiveRange::FirstSearchIntervalForPosition ( LifetimePosition position)
private

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

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

◆ GetAssignedOperand()

InstructionOperand v8::internal::compiler::LiveRange::GetAssignedOperand ( ) const

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

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

◆ HasRegisterAssigned()

bool v8::internal::compiler::LiveRange::HasRegisterAssigned ( ) const
inline

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

Here is the caller graph for this function:

◆ intervals()

const UseIntervalVector & v8::internal::compiler::LiveRange::intervals ( ) const
inline

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

Here is the caller graph for this function:

◆ IsEmpty()

bool v8::internal::compiler::LiveRange::IsEmpty ( ) const
inline

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

Here is the caller graph for this function:

◆ IsTopLevel()

bool v8::internal::compiler::LiveRange::IsTopLevel ( ) const

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

◆ kind()

RegisterKind v8::internal::compiler::LiveRange::kind ( ) const

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

Here is the call graph for this function:

◆ next()

LiveRange * v8::internal::compiler::LiveRange::next ( ) const
inline

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

Here is the caller graph for this function:

◆ NextEndAfter()

LifetimePosition v8::internal::compiler::LiveRange::NextEndAfter ( LifetimePosition position)

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

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

◆ NextLifetimePositionRegisterIsBeneficial()

LifetimePosition v8::internal::compiler::LiveRange::NextLifetimePositionRegisterIsBeneficial ( const LifetimePosition & start) const

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

Here is the call graph for this function:

◆ NextRegisterPosition()

UsePosition * v8::internal::compiler::LiveRange::NextRegisterPosition ( LifetimePosition start) const

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

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

◆ NextStart()

LifetimePosition v8::internal::compiler::LiveRange::NextStart ( ) const
inline

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

Here is the caller graph for this function:

◆ NextStartAfter()

LifetimePosition v8::internal::compiler::LiveRange::NextStartAfter ( LifetimePosition position)

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

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

◆ NextUsePosition()

UsePosition *const * v8::internal::compiler::LiveRange::NextUsePosition ( LifetimePosition start) const

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

Here is the caller graph for this function:

◆ NextUsePositionRegisterIsBeneficial()

UsePosition * v8::internal::compiler::LiveRange::NextUsePositionRegisterIsBeneficial ( LifetimePosition start) const

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

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

◆ NextUsePositionSpillDetrimental()

UsePosition * v8::internal::compiler::LiveRange::NextUsePositionSpillDetrimental ( LifetimePosition start) const

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

Here is the call graph for this function:

◆ operator=()

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

◆ positions()

base::Vector< UsePosition * > v8::internal::compiler::LiveRange::positions ( ) const
inline

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

Here is the caller graph for this function:

◆ Print() [1/2]

void v8::internal::compiler::LiveRange::Print ( bool with_children) const

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

Here is the call graph for this function:

◆ Print() [2/2]

void v8::internal::compiler::LiveRange::Print ( const RegisterConfiguration * config,
bool with_children ) const

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

Here is the caller graph for this function:

◆ RegisterFromBundle()

bool v8::internal::compiler::LiveRange::RegisterFromBundle ( int * hint) const

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

Here is the call graph for this function:

◆ RegisterFromControlFlow()

bool v8::internal::compiler::LiveRange::RegisterFromControlFlow ( int * reg)
inline

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

◆ RegisterFromFirstHint()

bool v8::internal::compiler::LiveRange::RegisterFromFirstHint ( int * register_index)

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

Here is the call graph for this function:

◆ relative_id()

int v8::internal::compiler::LiveRange::relative_id ( ) const
inline

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

Here is the caller graph for this function:

◆ representation()

MachineRepresentation v8::internal::compiler::LiveRange::representation ( ) const
inline

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

Here is the caller graph for this function:

◆ ResetCurrentHintPosition()

void v8::internal::compiler::LiveRange::ResetCurrentHintPosition ( )
inline

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

◆ set_assigned_register()

void v8::internal::compiler::LiveRange::set_assigned_register ( int reg)

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

Here is the call graph for this function:

◆ set_controlflow_hint()

void v8::internal::compiler::LiveRange::set_controlflow_hint ( int reg)
inline

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

Here is the caller graph for this function:

◆ set_spilled()

void v8::internal::compiler::LiveRange::set_spilled ( bool value)
inlineprivate

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

Here is the caller graph for this function:

◆ SetRecombine()

void v8::internal::compiler::LiveRange::SetRecombine ( )
inline

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

Here is the caller graph for this function:

◆ SetUseHints()

void v8::internal::compiler::LiveRange::SetUseHints ( int register_index)

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

◆ ShouldBeAllocatedBefore()

bool v8::internal::compiler::LiveRange::ShouldBeAllocatedBefore ( const LiveRange * other) const

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

Here is the call graph for this function:

◆ ShouldRecombine()

bool v8::internal::compiler::LiveRange::ShouldRecombine ( ) const
inline

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

◆ Spill()

void v8::internal::compiler::LiveRange::Spill ( )

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

Here is the call graph for this function:

◆ spilled()

bool v8::internal::compiler::LiveRange::spilled ( ) const
inline

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

Here is the caller graph for this function:

◆ SplitAt()

LiveRange * v8::internal::compiler::LiveRange::SplitAt ( LifetimePosition position,
Zone * zone )

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

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

◆ Start()

LifetimePosition v8::internal::compiler::LiveRange::Start ( ) const
inline

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

Here is the caller graph for this function:

◆ TopLevel() [1/2]

TopLevelLiveRange * v8::internal::compiler::LiveRange::TopLevel ( )
inline

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

Here is the caller graph for this function:

◆ TopLevel() [2/2]

const TopLevelLiveRange * v8::internal::compiler::LiveRange::TopLevel ( ) const
inline

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

◆ UnsetAssignedRegister()

void v8::internal::compiler::LiveRange::UnsetAssignedRegister ( )

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

Here is the call graph for this function:

◆ UnsetUseHints()

void v8::internal::compiler::LiveRange::UnsetUseHints ( )
inline

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

◆ Unspill()

void v8::internal::compiler::LiveRange::Unspill ( )

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

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

◆ UpdateBundleRegister()

void v8::internal::compiler::LiveRange::UpdateBundleRegister ( int reg) const

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

Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ TopLevelLiveRange

friend class TopLevelLiveRange
friend

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

Member Data Documentation

◆ bits_

uint32_t v8::internal::compiler::LiveRange::bits_
private

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

◆ current_hint_position_index_

size_t v8::internal::compiler::LiveRange::current_hint_position_index_ = 0
private

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

◆ current_interval_

UseIntervalVector::iterator v8::internal::compiler::LiveRange::current_interval_
private

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

◆ end_

LifetimePosition v8::internal::compiler::LiveRange::end_
private

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

◆ intervals_

UseIntervalVector v8::internal::compiler::LiveRange::intervals_
private

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

◆ next_

LiveRange* v8::internal::compiler::LiveRange::next_
private

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

◆ next_start_

LifetimePosition v8::internal::compiler::LiveRange::next_start_
private

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

◆ positions_span_

base::Vector<UsePosition*> v8::internal::compiler::LiveRange::positions_span_
private

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

◆ relative_id_

int v8::internal::compiler::LiveRange::relative_id_
private

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

◆ start_

LifetimePosition v8::internal::compiler::LiveRange::start_
private

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

◆ top_level_

TopLevelLiveRange* v8::internal::compiler::LiveRange::top_level_
private

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

◆ Zone

friend v8::internal::compiler::LiveRange::Zone
private

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


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