hoshi-lang dev
Yet another programming language
Loading...
Searching...
No Matches
IRFunctionOptimizer::SimulationStack Struct Reference

#include <IROptimizer.hpp>

Classes

struct  Item
 

Public Member Functions

 SimulationStack ()=default
 
void push (const std::shared_ptr< IRValueType > &type, const Item::ContributedInstructionSet &contributedInstructions)
 
void push (const std::shared_ptr< IRValueType > &type, const Item::ContributedInstructionSet &contributedInstructions, Item::PossibleValue value)
 
void push (const Item &item)
 
void pop ()
 
Itempeek (yoi::indexT index)
 

Public Attributes

std::vector< Itemitems
 

Detailed Description

Definition at line 61 of file IROptimizer.hpp.

Constructor & Destructor Documentation

◆ SimulationStack()

SimulationStack ( )
default

Member Function Documentation

◆ peek()

◆ pop()

void pop ( )

Definition at line 97 of file IROptimizer.cpp.

References IRFunctionOptimizer::SimulationStack::items.

Referenced by IRFunctionOptimizer::analyzeBlockForNullable(), and IRFunctionOptimizer::analyzeBlockForRaw().

Here is the caller graph for this function:

◆ push() [1/3]

void push ( const Item item)

Definition at line 93 of file IROptimizer.cpp.

References IRFunctionOptimizer::SimulationStack::items.

◆ push() [2/3]

void push ( const std::shared_ptr< IRValueType > &  type,
const Item::ContributedInstructionSet contributedInstructions 
)

Creates a new simulation stack item with the given type, contributed instructions, and will not have a possible value.

Parameters
typeThe IRValueType of the item.
contributedInstructionsThe set of instructions that contribute to the value of this item.

Definition at line 82 of file IROptimizer.cpp.

References IRFunctionOptimizer::SimulationStack::Item::contributedInstructions, IRFunctionOptimizer::SimulationStack::items, and IRFunctionOptimizer::SimulationStack::Item::type.

Referenced by IRFunctionOptimizer::analyzeBlockForNullable(), IRFunctionOptimizer::analyzeBlockForRaw(), IRFunctionOptimizer::handleInstruction(), yoi::mergeStates(), IRFunctionOptimizer::mergeStatesForInterfaceAllocationReduction(), IRFunctionOptimizer::mergeStatesForNullable(), IRFunctionOptimizer::mergeStatesForRaw(), and IRFunctionOptimizer::reduceRedundantConstantExpr().

Here is the caller graph for this function:

◆ push() [3/3]

void push ( const std::shared_ptr< IRValueType > &  type,
const Item::ContributedInstructionSet contributedInstructions,
Item::PossibleValue  value 
)

Creates a new simulation stack item with the given type, contributed instructions, and possible value.

Parameters
typeThe IRValueType of the item.
contributedInstructionsThe set of instructions that contribute to the value of this item.
valueThe possible value of the item.

Definition at line 87 of file IROptimizer.cpp.

References IRFunctionOptimizer::SimulationStack::Item::contributedInstructions, IRFunctionOptimizer::SimulationStack::items, and IRFunctionOptimizer::SimulationStack::Item::type.

Member Data Documentation

◆ items


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