|
Jlm
|
A phi node represents the fixpoint of mutually recursive definitions. More...
#include <Phi.hpp>


Classes | |
| struct | ContextVar |
| Bound context variable. More... | |
| struct | FixVar |
| Description of a recursively defined variable. More... | |
Public Member Functions | |
| ~PhiNode () override | |
| const PhiOperation & | GetOperation () const noexcept override |
| ContextVar | AddContextVar (jlm::rvsdg::Output &origin) |
| Adds a context variable to the phi node. More... | |
| void | RemoveContextVars (std::vector< ContextVar > vars) |
| Removes context variables from phi node. More... | |
| std::vector< ContextVar > | GetContextVars () const noexcept |
| Gets all bound context variables. More... | |
| ContextVar | MapInputContextVar (const rvsdg::Input &input) const noexcept |
| Maps input to context variable. More... | |
| std::optional< ContextVar > | MapArgumentContextVar (const rvsdg::Output &argument) const noexcept |
| Attempts to map bound variable reference to context variable. More... | |
| void | RemoveFixVars (std::vector< FixVar > vars) |
| Removes fixpoint variables from the phi node. More... | |
| std::vector< FixVar > | GetFixVars () const noexcept |
| Gets all fixpoint variables. More... | |
| std::optional< FixVar > | MapArgumentFixVar (const rvsdg::Output &argument) const noexcept |
| Tries to map region argument to fixpoint variable. More... | |
| FixVar | MapResultFixVar (const rvsdg::Input &result) const noexcept |
| Maps region result to fixpoint variable. More... | |
| FixVar | MapOutputFixVar (const rvsdg::Output &output) const noexcept |
| Maps output to fixpoint variable. More... | |
| std::variant< FixVar, ContextVar > | MapArgument (const rvsdg::Output &argument) const noexcept |
| Maps region argument to its function. More... | |
| rvsdg::Region * | subregion () const noexcept |
| PhiNode * | copy (rvsdg::Region *region, rvsdg::SubstitutionMap &smap) const override |
| Copy a node with substitutions. More... | |
Public Member Functions inherited from jlm::rvsdg::StructuralNode | |
| ~StructuralNode () noexcept override | |
| std::string | DebugString () const override |
| size_t | nsubregions () const noexcept |
| rvsdg::Region * | subregion (size_t index) const noexcept |
| SubregionIteratorRange | Subregions () |
| SubregionConstIteratorRange | Subregions () const |
| StructuralInput * | input (size_t index) const noexcept |
| StructuralOutput * | output (size_t index) const noexcept |
Public Member Functions inherited from jlm::rvsdg::Node | |
| virtual | ~Node () |
| Node (Region *region) | |
| Id | GetNodeId () const noexcept |
| size_t | ninputs () const noexcept |
| NodeInput * | input (size_t index) const noexcept |
| InputIteratorRange | Inputs () noexcept |
| InputConstIteratorRange | Inputs () const noexcept |
| size_t | noutputs () const noexcept |
| NodeOutput * | output (size_t index) const noexcept |
| OutputIteratorRange | Outputs () noexcept |
| OutputConstIteratorRange | Outputs () const noexcept |
| bool | IsDead () const noexcept |
| Determines whether the node is dead. More... | |
| std::size_t | numSuccessors () const noexcept |
| size_t | RemoveInputs (const util::HashSet< size_t > &indices) |
| size_t | RemoveOutputs (const util::HashSet< size_t > &indices) |
| Graph * | graph () const noexcept |
| rvsdg::Region * | region () const noexcept |
| virtual Node * | copy (rvsdg::Region *region, const std::vector< jlm::rvsdg::Output * > &operands) const |
Static Public Member Functions | |
| static std::vector< rvsdg::LambdaNode * > | ExtractLambdaNodes (const PhiNode &phiNode) |
Private Member Functions | |
| PhiNode (rvsdg::Region *parent) | |
Static Private Member Functions | |
| static PhiNode * | create (rvsdg::Region *parent) |
Friends | |
| class | PhiBuilder |
A phi node represents the fixpoint of mutually recursive definitions.
A phi node may contain multiple definitions of objects that mutually reference each other. It represents the fixpoint of infinitely unrolling the definitions.
A phi node may reference external definitions as ContextVars, and it may both define and reference several mutually recursive objects as FixVars.
|
overridedefault |
|
inlineexplicitprivate |
| PhiNode::ContextVar jlm::rvsdg::PhiNode::AddContextVar | ( | jlm::rvsdg::Output & | origin | ) |
Adds a context variable to the phi node.
| origin | The value to be bound into the phi node. |
origin must be from the same region as the phi node.Binds a new variable as context variable into the phi node. Its value can now be referenced from within the phi region.
|
overridevirtual |
Copy a node with substitutions.
| region | Target region to create node in |
| smap | Operand substitutions |
Create a new node that is semantically equivalent to an existing node. The newly created node will use the same operands as the existing node unless there is a substitution registered for a particular operand.
The given substitution map is updated so that all outputs of the original node will be substituted by corresponding outputs of the newly created node in subsequent copy operations.
Implements jlm::rvsdg::Node.
|
inlinestaticprivate |
|
static |
|
noexcept |
|
noexcept |
|
overridevirtualnoexcept |
Implements jlm::rvsdg::Node.
|
noexcept |
Maps region argument to its function.
| argument | The argument of the phi node to be mapped. |
argument must be an argument of the region within this phi node.Maps output of the phi node to either a fixpoint or context variable.
|
noexcept |
Attempts to map bound variable reference to context variable.
| argument | Region argument to phi subregion. |
argument, or std::nullopt.argument must be an argument to the subregion of this node.Checks whether the given argument corresponds to a context variable and returns its description in that case. All arguments of a phi region are either context or fixpoint variables, see MapArgumentFixVar.
|
noexcept |
Tries to map region argument to fixpoint variable.
| argument | The argument of the region to be mapped. |
argument, or std::nullopt.argument must be an argument of the subregion contained in the phi node.Checks whether the given argument corresponds to a fixpoint variable and returns its description in that case. All arguments of a phi region are either context or fixpoint variables, see MapArgumentContextVar.
|
noexcept |
Maps input to context variable.
| input | Input to the phi node. |
input must be input to this node.Returns the context variable description corresponding to this input of the phi node. All inputs to the phi node are by definition bound context variables that are accessible in the subregion through the corresponding argument.
|
noexcept |
Maps output to fixpoint variable.
| output | The output of the phi node to be mapped. |
output.output must be an output of this phi node.Maps output of the phi node to a fixpoint variable.
|
noexcept |
Maps region result to fixpoint variable.
| result | The result of the region to be mapped. |
input.result must be a result of the subregion contained in the phi node.Maps result of the region to a fixpoint variable.
| void jlm::rvsdg::PhiNode::RemoveContextVars | ( | std::vector< ContextVar > | vars | ) |
| void jlm::rvsdg::PhiNode::RemoveFixVars | ( | std::vector< FixVar > | vars | ) |
|
inlinenoexcept |
|
friend |