hoshi-lang dev
Yet another programming language
Loading...
Searching...
No Matches
LLVMCodegen::ValueStackWithPhi Struct Reference
Collaboration diagram for LLVMCodegen::ValueStackWithPhi:

Public Types

enum class  StackState { Finalized , InEvaluation }
 

Public Member Functions

 ValueStackWithPhi (const ControlFlowAnalysis &cfa, llvm::IRBuilder<> *builder, const std::shared_ptr< IRModule > &yoiModule)
 
void enterNode (yoi::indexT currentState, yoi::indexT fromState, llvm::BasicBlock *currentBlock, llvm::BasicBlock *fromBlock)
 
void enterNode (yoi::indexT currentState, llvm::BasicBlock *currentBlock)
 
void finalizeNode ()
 
void push_back (const StackValue &value)
 
StackValueback ()
 
void pop_back ()
 
void clear ()
 
StackValueoperator[] (yoi::indexT index)
 
yoi::indexT size () const
 
bool empty () const
 

Public Attributes

std::map< yoi::indexT, yoi::vec< StackValue > > valueStackStateIn
 
std::map< yoi::indexT, yoi::vec< StackValue > > valueStackStateOut
 
std::map< yoi::indexT, yoi::vec< llvm::PHINode * > > phiNodes
 
enum yoi::LLVMCodegen::ValueStackWithPhi::StackState stackState
 
const ControlFlowAnalysiscfa
 
yoi::indexT currentState
 
llvm::IRBuilder * builder
 
std::shared_ptr< IRModuleyoiModule
 

Detailed Description

Definition at line 66 of file llvmCodegenContext.hpp.

Member Enumeration Documentation

◆ StackState

enum class StackState
strong
Enumerator
Finalized 
InEvaluation 

Definition at line 70 of file llvmCodegenContext.hpp.

Constructor & Destructor Documentation

◆ ValueStackWithPhi()

ValueStackWithPhi ( const ControlFlowAnalysis cfa,
llvm::IRBuilder<> *  builder,
const std::shared_ptr< IRModule > &  yoiModule 
)

Definition at line 4130 of file llvmCodegenContext.cpp.

Member Function Documentation

◆ back()

◆ clear()

void clear ( )

Definition at line 4222 of file llvmCodegenContext.cpp.

Referenced by LLVMCodegen::generateFunction().

Here is the caller graph for this function:

◆ empty()

bool empty ( ) const

Definition at line 4254 of file llvmCodegenContext.cpp.

Referenced by LLVMCodegen::generateInstruction().

Here is the caller graph for this function:

◆ enterNode() [1/2]

void enterNode ( yoi::indexT  currentState,
llvm::BasicBlock *  currentBlock 
)

Definition at line 4230 of file llvmCodegenContext.cpp.

References yoi::panic(), and yoi::yoi_assert().

Here is the call graph for this function:

◆ enterNode() [2/2]

void enterNode ( yoi::indexT  currentState,
yoi::indexT  fromState,
llvm::BasicBlock *  currentBlock,
llvm::BasicBlock *  fromBlock 
)

Definition at line 4133 of file llvmCodegenContext.cpp.

References yoi::panic(), yoi::yoi_assert(), and LLVMCodegen::yoiModule.

Referenced by LLVMCodegen::generateCodeBlock().

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

◆ finalizeNode()

void finalizeNode ( )

Definition at line 4204 of file llvmCodegenContext.cpp.

References yoi::yoi_assert().

Referenced by LLVMCodegen::generateCodeBlock().

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

◆ operator[]()

LLVMCodegen::StackValue & operator[] ( yoi::indexT  index)

Definition at line 4246 of file llvmCodegenContext.cpp.

◆ pop_back()

void pop_back ( )

◆ push_back()

void push_back ( const StackValue value)

◆ size()

yoi::indexT size ( ) const

Definition at line 4250 of file llvmCodegenContext.cpp.

Referenced by LLVMCodegen::generateInstruction().

Here is the caller graph for this function:

Member Data Documentation

◆ builder

llvm::IRBuilder* builder

Definition at line 76 of file llvmCodegenContext.hpp.

◆ cfa

const ControlFlowAnalysis& cfa

Definition at line 74 of file llvmCodegenContext.hpp.

◆ currentState

yoi::indexT currentState

Definition at line 75 of file llvmCodegenContext.hpp.

◆ phiNodes

std::map<yoi::indexT, yoi::vec<llvm::PHINode *> > phiNodes

Definition at line 69 of file llvmCodegenContext.hpp.

◆ stackState

◆ valueStackStateIn

std::map<yoi::indexT, yoi::vec<StackValue> > valueStackStateIn

Definition at line 67 of file llvmCodegenContext.hpp.

◆ valueStackStateOut

std::map<yoi::indexT, yoi::vec<StackValue> > valueStackStateOut

Definition at line 68 of file llvmCodegenContext.hpp.

◆ yoiModule

std::shared_ptr<IRModule> yoiModule

Definition at line 77 of file llvmCodegenContext.hpp.


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