hoshi-lang dev
Yet another programming language
Loading...
Searching...
No Matches
IROptimizer Class Reference

#include <IROptimizer.hpp>

Collaboration diagram for IROptimizer:

Public Member Functions

 IROptimizer (const std::shared_ptr< compilerContext > &compilerCtx, yoi::indexT entryModuleIndex)
 
void buildCallGraph ()
 
void optimize ()
 

Private Member Functions

bool performStructNullablePass ()
 
bool performInterfaceWrapperPass ()
 
bool performBaseOptimization ()
 

Private Attributes

std::shared_ptr< compilerContextcompilerCtx
 
CallGraph callGraph
 
yoi::indexT entryModuleIndex
 
std::map< CallGraph::FuncIdentifier, FunctionAnalysisInfofunctionAnalysisResults
 

Detailed Description

Definition at line 287 of file IROptimizer.hpp.

Constructor & Destructor Documentation

◆ IROptimizer()

IROptimizer ( const std::shared_ptr< compilerContext > &  compilerCtx,
yoi::indexT  entryModuleIndex 
)

Definition at line 4323 of file IROptimizer.cpp.

Member Function Documentation

◆ buildCallGraph()

◆ optimize()

void optimize ( )

Definition at line 4396 of file IROptimizer.cpp.

References IROptimizer::performBaseOptimization(), IROptimizer::performInterfaceWrapperPass(), and IROptimizer::performStructNullablePass().

Here is the call graph for this function:

◆ performBaseOptimization()

◆ performInterfaceWrapperPass()

bool performInterfaceWrapperPass ( )
private

Definition at line 4514 of file IROptimizer.cpp.

References IRValueType::Borrow, IROptimizer::compilerCtx, visitor::getInterfaceImplName(), yoi::managedPtr(), IRValueType::Nullable, and IRValueType::Raw.

Referenced by IROptimizer::optimize().

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

◆ performStructNullablePass()

bool performStructNullablePass ( )
private

Definition at line 4498 of file IROptimizer.cpp.

References IROptimizer::compilerCtx, yoi::managedPtr(), IRValueType::Nullable, and IRValueType::Raw.

Referenced by IROptimizer::optimize().

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

Member Data Documentation

◆ callGraph

CallGraph callGraph
private

◆ compilerCtx

◆ entryModuleIndex

yoi::indexT entryModuleIndex
private

Definition at line 290 of file IROptimizer.hpp.

Referenced by IROptimizer::buildCallGraph().

◆ functionAnalysisResults

std::map<CallGraph::FuncIdentifier, FunctionAnalysisInfo> functionAnalysisResults
private

Definition at line 291 of file IROptimizer.hpp.

Referenced by IROptimizer::performBaseOptimization().


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