V8 Project
v8::internal::compiler::UsePosition Class Reference

#include <register-allocator.h>

+ Inheritance diagram for v8::internal::compiler::UsePosition:
+ Collaboration diagram for v8::internal::compiler::UsePosition:

Public Member Functions

 UsePosition (LifetimePosition pos, InstructionOperand *operand, InstructionOperand *hint)
 
InstructionOperandoperand () const
 
bool HasOperand () const
 
InstructionOperandhint () const
 
bool HasHint () const
 
bool RequiresRegister () const
 
bool RegisterIsBeneficial () const
 
LifetimePosition pos () const
 
UsePositionnext () const
 
void set_next (UsePosition *next)
 
- Public Member Functions inherited from v8::internal::ZoneObject
 INLINE (void *operator new(size_t size, Zone *zone))
 
void operator delete (void *, size_t)
 
void operator delete (void *pointer, Zone *zone)
 

Public Attributes

InstructionOperand *const operand_
 
InstructionOperand *const hint_
 
LifetimePosition const pos_
 
UsePositionnext_
 
bool requires_reg_
 
bool register_beneficial_
 

Detailed Description

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

Constructor & Destructor Documentation

◆ UsePosition()

v8::internal::compiler::UsePosition::UsePosition ( LifetimePosition  pos,
InstructionOperand operand,
InstructionOperand hint 
)

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

27  : operand_(operand),
28  hint_(hint),
29  pos_(pos),
30  next_(NULL),
31  requires_reg_(false),
32  register_beneficial_(true) {
33  if (operand_ != NULL && operand_->IsUnallocated()) {
34  const UnallocatedOperand* unalloc = UnallocatedOperand::cast(operand_);
35  requires_reg_ = unalloc->HasRegisterPolicy();
36  register_beneficial_ = !unalloc->HasAnyPolicy();
37  }
38  DCHECK(pos_.IsValid());
39 }
static const UnallocatedOperand * cast(const InstructionOperand *op)
Definition: instruction.h:160
InstructionOperand *const operand_
InstructionOperand * hint() const
InstructionOperand * operand() const
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be NULL
#define DCHECK(condition)
Definition: logging.h:205

References v8::internal::compiler::UnallocatedOperand::cast(), DCHECK, v8::internal::compiler::UnallocatedOperand::HasAnyPolicy(), v8::internal::compiler::UnallocatedOperand::HasRegisterPolicy(), v8::internal::compiler::LifetimePosition::IsValid(), NULL, operand_, pos_, register_beneficial_, and requires_reg_.

+ Here is the call graph for this function:

Member Function Documentation

◆ HasHint()

bool v8::internal::compiler::UsePosition::HasHint ( ) const

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

42  {
43  return hint_ != NULL && !hint_->IsUnallocated();
44 }

References hint_, and NULL.

Referenced by v8::internal::compiler::LiveRange::AddUsePosition(), and v8::internal::compiler::LiveRange::FirstHint().

+ Here is the caller graph for this function:

◆ HasOperand()

bool v8::internal::compiler::UsePosition::HasOperand ( ) const
inline

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

159 { return operand_ != NULL; }

References NULL, and operand_.

Referenced by v8::internal::compiler::LiveRange::ConvertOperands().

+ Here is the caller graph for this function:

◆ hint()

InstructionOperand* v8::internal::compiler::UsePosition::hint ( ) const
inline

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

161 { return hint_; }

References hint_.

Referenced by v8::internal::compiler::LiveRange::FirstHint().

+ Here is the caller graph for this function:

◆ next()

◆ operand()

InstructionOperand* v8::internal::compiler::UsePosition::operand ( ) const
inline

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

158 { return operand_; }

References operand_.

Referenced by v8::internal::compiler::LiveRange::ConvertOperands().

+ Here is the caller graph for this function:

◆ pos()

LifetimePosition v8::internal::compiler::UsePosition::pos ( ) const
inline

◆ RegisterIsBeneficial()

bool v8::internal::compiler::UsePosition::RegisterIsBeneficial ( ) const

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

50 { return register_beneficial_; }

References register_beneficial_.

Referenced by v8::internal::compiler::LiveRange::NextUsePositionRegisterIsBeneficial(), and v8::internal::compiler::LiveRange::PreviousUsePositionRegisterIsBeneficial().

+ Here is the caller graph for this function:

◆ RequiresRegister()

bool v8::internal::compiler::UsePosition::RequiresRegister ( ) const

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

47 { return requires_reg_; }

References requires_reg_.

Referenced by v8::internal::compiler::LiveRange::ConvertOperands(), and v8::internal::compiler::LiveRange::NextRegisterPosition().

+ Here is the caller graph for this function:

◆ set_next()

void v8::internal::compiler::UsePosition::set_next ( UsePosition next)
inline

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

169 { next_ = next; }

References next(), and next_.

Referenced by v8::internal::compiler::LiveRange::AddUsePosition().

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

Member Data Documentation

◆ hint_

InstructionOperand* const v8::internal::compiler::UsePosition::hint_

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

Referenced by HasHint(), and hint().

◆ next_

UsePosition* v8::internal::compiler::UsePosition::next_

◆ operand_

InstructionOperand* const v8::internal::compiler::UsePosition::operand_

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

Referenced by HasOperand(), operand(), and UsePosition().

◆ pos_

LifetimePosition const v8::internal::compiler::UsePosition::pos_

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

Referenced by pos(), and UsePosition().

◆ register_beneficial_

bool v8::internal::compiler::UsePosition::register_beneficial_

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

Referenced by RegisterIsBeneficial(), and UsePosition().

◆ requires_reg_

bool v8::internal::compiler::UsePosition::requires_reg_

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

Referenced by RequiresRegister(), and UsePosition().


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