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

#include <instruction.h>

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

Public Types

using const_iterator = Instructions::const_iterator
 
using Immediates = ZoneVector<Constant>
 
using RpoImmediates = ZoneVector<RpoNumber>
 

Public Member Functions

 InstructionSequence (Isolate *isolate, Zone *zone, InstructionBlocks *instruction_blocks)
 
 InstructionSequence (const InstructionSequence &)=delete
 
InstructionSequenceoperator= (const InstructionSequence &)=delete
 
int NextVirtualRegister ()
 
int VirtualRegisterCount () const
 
const InstructionBlocksinstruction_blocks () const
 
const InstructionBlocksao_blocks () const
 
int InstructionBlockCount () const
 
InstructionBlockInstructionBlockAt (RpoNumber rpo_number)
 
int LastLoopInstructionIndex (const InstructionBlock *block)
 
const InstructionBlockInstructionBlockAt (RpoNumber rpo_number) const
 
InstructionBlockGetInstructionBlock (int instruction_index) const
 
MachineRepresentation GetRepresentation (int virtual_register) const
 
void MarkAsRepresentation (MachineRepresentation rep, int virtual_register)
 
bool IsReference (int virtual_register) const
 
bool IsFP (int virtual_register) const
 
int representation_mask () const
 
bool HasFPVirtualRegisters () const
 
bool HasSimd128VirtualRegisters () const
 
InstructionGetBlockStart (RpoNumber rpo) const
 
const_iterator begin () const
 
const_iterator end () const
 
const Instructionsinstructions () const
 
int LastInstructionIndex () const
 
InstructionInstructionAt (int index) const
 
Isolateisolate () const
 
const ReferenceMapsreference_maps () const
 
Zonezone () const
 
int AddInstruction (Instruction *instr)
 
void StartBlock (RpoNumber rpo)
 
void EndBlock (RpoNumber rpo)
 
void AddConstant (int virtual_register, Constant constant)
 
Constant GetConstant (int virtual_register) const
 
Immediatesimmediates ()
 
RpoImmediatesrpo_immediates ()
 
ImmediateOperand AddImmediate (const Constant &constant)
 
Constant GetImmediate (const ImmediateOperand *op) const
 
int AddDeoptimizationEntry (FrameStateDescriptor *descriptor, DeoptimizeKind kind, DeoptimizeReason reason, NodeId node_id, FeedbackSource const &feedback)
 
DeoptimizationEntry const & GetDeoptimizationEntry (int deoptimization_id)
 
int GetDeoptimizationEntryCount () const
 
RpoNumber InputRpo (Instruction *instr, size_t index)
 
bool GetSourcePosition (const Instruction *instr, SourcePosition *result) const
 
void SetSourcePosition (const Instruction *instr, SourcePosition value)
 
bool ContainsCall () const
 
void Print () const
 
void PrintBlock (int block_id) const
 
void ValidateEdgeSplitForm () const
 
void ValidateDeferredBlockExitPaths () const
 
void ValidateDeferredBlockEntryPaths () const
 
void ValidateSSA () const
 
void RecomputeAssemblyOrderForTesting ()
 
void IncreaseRpoForTesting (size_t rpo_count)
 

Static Public Member Functions

static InstructionBlocksInstructionBlocksFor (Zone *zone, const Schedule *schedule)
 
static InstructionBlocksInstructionBlocksFor (Zone *zone, const turboshaft::Graph &graph)
 
static MachineRepresentation DefaultRepresentation ()
 
static void SetRegisterConfigurationForTesting (const RegisterConfiguration *regConfig)
 
static void ClearRegisterConfigurationForTesting ()
 

Private Types

using SourcePositionMap
 

Private Member Functions

void ComputeAssemblyOrder ()
 

Static Private Member Functions

static const RegisterConfigurationRegisterConfigurationForTesting ()
 

Private Attributes

Isolateisolate_
 
Zone *const zone_
 
InstructionBlocks *const instruction_blocks_
 
InstructionBlocksao_blocks_
 
SourcePositionMap source_positions_
 
ConstantMap constants_
 
Immediates immediates_
 
RpoImmediates rpo_immediates_
 
Instructions instructions_
 
int next_virtual_register_
 
ReferenceMaps reference_maps_
 
ZoneVector< MachineRepresentationrepresentations_
 
int representation_mask_
 
DeoptimizationVector deoptimization_entries_
 
InstructionBlockcurrent_block_
 

Static Private Attributes

static const RegisterConfigurationregisterConfigurationForTesting_ = nullptr
 

Friends

V8_EXPORT_PRIVATE std::ostream & operator<< (std::ostream &os, const InstructionSequence &code)
 

Detailed Description

Definition at line 1830 of file instruction.h.

Member Typedef Documentation

◆ const_iterator

◆ Immediates

◆ RpoImmediates

◆ SourcePositionMap

Initial value:
ZoneAbslFlatHashMap<const Instruction*, SourcePosition>

Definition at line 2042 of file instruction.h.

Constructor & Destructor Documentation

◆ InstructionSequence() [1/2]

v8::internal::compiler::InstructionSequence::InstructionSequence ( Isolate * isolate,
Zone * zone,
InstructionBlocks * instruction_blocks )

Definition at line 974 of file instruction.cc.

Here is the call graph for this function:

◆ InstructionSequence() [2/2]

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

Member Function Documentation

◆ AddConstant()

void v8::internal::compiler::InstructionSequence::AddConstant ( int virtual_register,
Constant constant )
inline

Definition at line 1926 of file instruction.h.

Here is the caller graph for this function:

◆ AddDeoptimizationEntry()

int v8::internal::compiler::InstructionSequence::AddDeoptimizationEntry ( FrameStateDescriptor * descriptor,
DeoptimizeKind kind,
DeoptimizeReason reason,
NodeId node_id,
FeedbackSource const & feedback )

Definition at line 1095 of file instruction.cc.

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

◆ AddImmediate()

ImmediateOperand v8::internal::compiler::InstructionSequence::AddImmediate ( const Constant & constant)
inline

Definition at line 1946 of file instruction.h.

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

◆ AddInstruction()

int v8::internal::compiler::InstructionSequence::AddInstruction ( Instruction * instr)

Definition at line 1026 of file instruction.cc.

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

◆ ao_blocks()

const InstructionBlocks & v8::internal::compiler::InstructionSequence::ao_blocks ( ) const
inline

Definition at line 1849 of file instruction.h.

◆ begin()

const_iterator v8::internal::compiler::InstructionSequence::begin ( ) const
inline

Definition at line 1904 of file instruction.h.

◆ ClearRegisterConfigurationForTesting()

static void v8::internal::compiler::InstructionSequence::ClearRegisterConfigurationForTesting ( )
static

◆ ComputeAssemblyOrder()

void v8::internal::compiler::InstructionSequence::ComputeAssemblyOrder ( )
private

Definition at line 915 of file instruction.cc.

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

◆ ContainsCall()

bool v8::internal::compiler::InstructionSequence::ContainsCall ( ) const
inline

Definition at line 2010 of file instruction.h.

◆ DefaultRepresentation()

static MachineRepresentation v8::internal::compiler::InstructionSequence::DefaultRepresentation ( )
inlinestatic

Definition at line 1872 of file instruction.h.

Here is the caller graph for this function:

◆ end()

const_iterator v8::internal::compiler::InstructionSequence::end ( ) const
inline

Definition at line 1905 of file instruction.h.

Here is the caller graph for this function:

◆ EndBlock()

void v8::internal::compiler::InstructionSequence::EndBlock ( RpoNumber rpo)

Definition at line 1017 of file instruction.cc.

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

◆ GetBlockStart()

Instruction * v8::internal::compiler::InstructionSequence::GetBlockStart ( RpoNumber rpo) const

Definition at line 1005 of file instruction.cc.

Here is the call graph for this function:

◆ GetConstant()

Constant v8::internal::compiler::InstructionSequence::GetConstant ( int virtual_register) const
inline

Definition at line 1933 of file instruction.h.

Here is the caller graph for this function:

◆ GetDeoptimizationEntry()

DeoptimizationEntry const & v8::internal::compiler::InstructionSequence::GetDeoptimizationEntry ( int deoptimization_id)

Definition at line 1104 of file instruction.cc.

Here is the caller graph for this function:

◆ GetDeoptimizationEntryCount()

int v8::internal::compiler::InstructionSequence::GetDeoptimizationEntryCount ( ) const
inline

Definition at line 2000 of file instruction.h.

◆ GetImmediate()

Constant v8::internal::compiler::InstructionSequence::GetImmediate ( const ImmediateOperand * op) const
inline

Definition at line 1974 of file instruction.h.

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

◆ GetInstructionBlock()

InstructionBlock * v8::internal::compiler::InstructionSequence::GetInstructionBlock ( int instruction_index) const
inline

Definition at line 1868 of file instruction.h.

Here is the caller graph for this function:

◆ GetRepresentation()

MachineRepresentation v8::internal::compiler::InstructionSequence::GetRepresentation ( int virtual_register) const

Definition at line 1071 of file instruction.cc.

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

◆ GetSourcePosition()

bool v8::internal::compiler::InstructionSequence::GetSourcePosition ( const Instruction * instr,
SourcePosition * result ) const

Definition at line 1118 of file instruction.cc.

◆ HasFPVirtualRegisters()

bool v8::internal::compiler::InstructionSequence::HasFPVirtualRegisters ( ) const
inline

Definition at line 1885 of file instruction.h.

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

◆ HasSimd128VirtualRegisters()

bool v8::internal::compiler::InstructionSequence::HasSimd128VirtualRegisters ( ) const
inline

Definition at line 1895 of file instruction.h.

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

◆ immediates()

Immediates & v8::internal::compiler::InstructionSequence::immediates ( )
inline

Definition at line 1941 of file instruction.h.

◆ IncreaseRpoForTesting()

void v8::internal::compiler::InstructionSequence::IncreaseRpoForTesting ( size_t rpo_count)
inline

Definition at line 2033 of file instruction.h.

◆ InputRpo()

RpoNumber v8::internal::compiler::InstructionSequence::InputRpo ( Instruction * instr,
size_t index )

Definition at line 1109 of file instruction.cc.

Here is the call graph for this function:

◆ instruction_blocks()

const InstructionBlocks & v8::internal::compiler::InstructionSequence::instruction_blocks ( ) const
inline

Definition at line 1845 of file instruction.h.

Here is the caller graph for this function:

◆ InstructionAt()

Instruction * v8::internal::compiler::InstructionSequence::InstructionAt ( int index) const
inline

Definition at line 1911 of file instruction.h.

Here is the caller graph for this function:

◆ InstructionBlockAt() [1/2]

InstructionBlock * v8::internal::compiler::InstructionSequence::InstructionBlockAt ( RpoNumber rpo_number)
inline

Definition at line 1855 of file instruction.h.

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

◆ InstructionBlockAt() [2/2]

const InstructionBlock * v8::internal::compiler::InstructionSequence::InstructionBlockAt ( RpoNumber rpo_number) const
inline

Definition at line 1864 of file instruction.h.

Here is the call graph for this function:

◆ InstructionBlockCount()

int v8::internal::compiler::InstructionSequence::InstructionBlockCount ( ) const
inline

Definition at line 1851 of file instruction.h.

Here is the caller graph for this function:

◆ InstructionBlocksFor() [1/2]

InstructionBlocks * v8::internal::compiler::InstructionSequence::InstructionBlocksFor ( Zone * zone,
const Schedule * schedule )
static

Definition at line 824 of file instruction.cc.

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

◆ InstructionBlocksFor() [2/2]

InstructionBlocks * v8::internal::compiler::InstructionSequence::InstructionBlocksFor ( Zone * zone,
const turboshaft::Graph & graph )
static

Definition at line 839 of file instruction.cc.

Here is the call graph for this function:

◆ instructions()

const Instructions & v8::internal::compiler::InstructionSequence::instructions ( ) const
inline

Definition at line 1906 of file instruction.h.

Here is the caller graph for this function:

◆ IsFP()

bool v8::internal::compiler::InstructionSequence::IsFP ( int virtual_register) const
inline

Definition at line 1881 of file instruction.h.

Here is the call graph for this function:

◆ isolate()

Isolate * v8::internal::compiler::InstructionSequence::isolate ( ) const
inline

Definition at line 1917 of file instruction.h.

Here is the caller graph for this function:

◆ IsReference()

bool v8::internal::compiler::InstructionSequence::IsReference ( int virtual_register) const
inline

Definition at line 1878 of file instruction.h.

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

◆ LastInstructionIndex()

int v8::internal::compiler::InstructionSequence::LastInstructionIndex ( ) const
inline

Definition at line 1907 of file instruction.h.

◆ LastLoopInstructionIndex()

int v8::internal::compiler::InstructionSequence::LastLoopInstructionIndex ( const InstructionBlock * block)
inline

Definition at line 1859 of file instruction.h.

◆ MarkAsRepresentation()

void v8::internal::compiler::InstructionSequence::MarkAsRepresentation ( MachineRepresentation rep,
int virtual_register )

Definition at line 1081 of file instruction.cc.

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

◆ NextVirtualRegister()

int v8::internal::compiler::InstructionSequence::NextVirtualRegister ( )

Definition at line 999 of file instruction.cc.

Here is the caller graph for this function:

◆ operator=()

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

◆ Print()

void v8::internal::compiler::InstructionSequence::Print ( ) const

Definition at line 1131 of file instruction.cc.

◆ PrintBlock()

void v8::internal::compiler::InstructionSequence::PrintBlock ( int block_id) const

Definition at line 1135 of file instruction.cc.

Here is the call graph for this function:

◆ RecomputeAssemblyOrderForTesting()

void v8::internal::compiler::InstructionSequence::RecomputeAssemblyOrderForTesting ( )

Definition at line 966 of file instruction.cc.

Here is the call graph for this function:

◆ reference_maps()

const ReferenceMaps * v8::internal::compiler::InstructionSequence::reference_maps ( ) const
inline

Definition at line 1918 of file instruction.h.

Here is the caller graph for this function:

◆ RegisterConfigurationForTesting()

const RegisterConfiguration * v8::internal::compiler::InstructionSequence::RegisterConfigurationForTesting ( )
staticprivate

Definition at line 1146 of file instruction.cc.

Here is the caller graph for this function:

◆ representation_mask()

int v8::internal::compiler::InstructionSequence::representation_mask ( ) const
inline

Definition at line 1884 of file instruction.h.

Here is the caller graph for this function:

◆ rpo_immediates()

RpoImmediates & v8::internal::compiler::InstructionSequence::rpo_immediates ( )
inline

Definition at line 1944 of file instruction.h.

◆ SetRegisterConfigurationForTesting()

void v8::internal::compiler::InstructionSequence::SetRegisterConfigurationForTesting ( const RegisterConfiguration * regConfig)
static

Definition at line 1151 of file instruction.cc.

Here is the call graph for this function:

◆ SetSourcePosition()

void v8::internal::compiler::InstructionSequence::SetSourcePosition ( const Instruction * instr,
SourcePosition value )

Definition at line 1126 of file instruction.cc.

Here is the caller graph for this function:

◆ StartBlock()

void v8::internal::compiler::InstructionSequence::StartBlock ( RpoNumber rpo)

Definition at line 1010 of file instruction.cc.

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

◆ ValidateDeferredBlockEntryPaths()

void v8::internal::compiler::InstructionSequence::ValidateDeferredBlockEntryPaths ( ) const

Definition at line 886 of file instruction.cc.

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

◆ ValidateDeferredBlockExitPaths()

void v8::internal::compiler::InstructionSequence::ValidateDeferredBlockExitPaths ( ) const

Definition at line 875 of file instruction.cc.

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

◆ ValidateEdgeSplitForm()

void v8::internal::compiler::InstructionSequence::ValidateEdgeSplitForm ( ) const

Definition at line 860 of file instruction.cc.

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

◆ ValidateSSA()

void v8::internal::compiler::InstructionSequence::ValidateSSA ( ) const

Definition at line 900 of file instruction.cc.

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

◆ VirtualRegisterCount()

int v8::internal::compiler::InstructionSequence::VirtualRegisterCount ( ) const
inline

Definition at line 1843 of file instruction.h.

Here is the caller graph for this function:

◆ zone()

Zone * v8::internal::compiler::InstructionSequence::zone ( ) const
inline

Definition at line 1919 of file instruction.h.

Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ operator<<

V8_EXPORT_PRIVATE std::ostream & operator<< ( std::ostream & os,
const InstructionSequence & code )
friend

Definition at line 1335 of file instruction.cc.

Member Data Documentation

◆ ao_blocks_

InstructionBlocks* v8::internal::compiler::InstructionSequence::ao_blocks_
private

Definition at line 2054 of file instruction.h.

◆ constants_

ConstantMap v8::internal::compiler::InstructionSequence::constants_
private

Definition at line 2056 of file instruction.h.

◆ current_block_

InstructionBlock* v8::internal::compiler::InstructionSequence::current_block_
private

Definition at line 2067 of file instruction.h.

◆ deoptimization_entries_

DeoptimizationVector v8::internal::compiler::InstructionSequence::deoptimization_entries_
private

Definition at line 2064 of file instruction.h.

◆ immediates_

Immediates v8::internal::compiler::InstructionSequence::immediates_
private

Definition at line 2057 of file instruction.h.

◆ instruction_blocks_

InstructionBlocks* const v8::internal::compiler::InstructionSequence::instruction_blocks_
private

Definition at line 2053 of file instruction.h.

◆ instructions_

Instructions v8::internal::compiler::InstructionSequence::instructions_
private

Definition at line 2059 of file instruction.h.

◆ isolate_

Isolate* v8::internal::compiler::InstructionSequence::isolate_
private

Definition at line 2051 of file instruction.h.

◆ next_virtual_register_

int v8::internal::compiler::InstructionSequence::next_virtual_register_
private

Definition at line 2060 of file instruction.h.

◆ reference_maps_

ReferenceMaps v8::internal::compiler::InstructionSequence::reference_maps_
private

Definition at line 2061 of file instruction.h.

◆ registerConfigurationForTesting_

const RegisterConfiguration * v8::internal::compiler::InstructionSequence::registerConfigurationForTesting_ = nullptr
staticprivate

Definition at line 2046 of file instruction.h.

◆ representation_mask_

int v8::internal::compiler::InstructionSequence::representation_mask_
private

Definition at line 2063 of file instruction.h.

◆ representations_

ZoneVector<MachineRepresentation> v8::internal::compiler::InstructionSequence::representations_
private

Definition at line 2062 of file instruction.h.

◆ rpo_immediates_

RpoImmediates v8::internal::compiler::InstructionSequence::rpo_immediates_
private

Definition at line 2058 of file instruction.h.

◆ source_positions_

SourcePositionMap v8::internal::compiler::InstructionSequence::source_positions_
private

Definition at line 2055 of file instruction.h.

◆ zone_

Zone* const v8::internal::compiler::InstructionSequence::zone_
private

Definition at line 2052 of file instruction.h.


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