|
hoshi-lang dev
Yet another programming language
|
#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 () |
| Item & | peek (yoi::indexT index) |
Public Attributes | |
| std::vector< Item > | items |
Definition at line 61 of file IROptimizer.hpp.
|
default |
| IRFunctionOptimizer::SimulationStack::Item & peek | ( | yoi::indexT | index | ) |
Definition at line 101 of file IROptimizer.cpp.
References IRFunctionOptimizer::SimulationStack::items.
Referenced by IRFunctionOptimizer::analyzeBlockForInterfaceAllocationReduction(), IRFunctionOptimizer::analyzeBlockForNullable(), and IRFunctionOptimizer::analyzeBlockForRaw().

| void pop | ( | ) |
Definition at line 97 of file IROptimizer.cpp.
References IRFunctionOptimizer::SimulationStack::items.
Referenced by IRFunctionOptimizer::analyzeBlockForNullable(), and IRFunctionOptimizer::analyzeBlockForRaw().

| void push | ( | const Item & | item | ) |
Definition at line 93 of file IROptimizer.cpp.
References IRFunctionOptimizer::SimulationStack::items.
| 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.
| type | The IRValueType of the item. |
| contributedInstructions | The 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().

| 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.
| type | The IRValueType of the item. |
| contributedInstructions | The set of instructions that contribute to the value of this item. |
| value | The 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.
| std::vector<Item> items |
Definition at line 128 of file IROptimizer.hpp.
Referenced by IRFunctionOptimizer::analyzeBlockForNullable(), yoi::mergeStates(), IRFunctionOptimizer::mergeStatesForInterfaceAllocationReduction(), IRFunctionOptimizer::mergeStatesForNullable(), IRFunctionOptimizer::mergeStatesForRaw(), AnalysisState::operator!=(), IRFunctionOptimizer::SimulationStack::peek(), IRFunctionOptimizer::performNullableCheck(), IRFunctionOptimizer::performRawCheck(), IRFunctionOptimizer::SimulationStack::pop(), IRFunctionOptimizer::SimulationStack::push(), IRFunctionOptimizer::SimulationStack::push(), IRFunctionOptimizer::SimulationStack::push(), and IRFunctionOptimizer::reduceRedundantTempVar().