|
Jlm
|
Delta node. More...
#include <delta.hpp>


Classes | |
| struct | ContextVar |
| Bound context variable. More... | |
Public Member Functions | |
| ~DeltaNode () noexcept override | |
| ContextVar | AddContextVar (jlm::rvsdg::Output &origin) |
| Adds a context/free variable to the delta node. More... | |
| ContextVar | MapInputContextVar (const rvsdg::Input &input) const noexcept |
| Maps input to context variable. More... | |
| ContextVar | MapBinderContextVar (const rvsdg::Output &output) const noexcept |
| Maps bound variable reference to context variable. More... | |
| std::vector< ContextVar > | GetContextVars () const noexcept |
| Gets all bound context variables. More... | |
| rvsdg::Region * | subregion () const noexcept |
| const DeltaOperation & | GetOperation () const noexcept override |
| const std::shared_ptr< const rvsdg::Type > & | Type () const noexcept |
| bool | constant () const noexcept |
| template<typename F > | |
| size_t | RemoveDeltaInputsWhere (const F &match) |
| size_t | PruneDeltaInputs () |
| rvsdg::Output & | output () const noexcept |
| rvsdg::Input & | result () const noexcept |
| DeltaNode * | copy (rvsdg::Region *region, const std::vector< jlm::rvsdg::Output * > &operands) const override |
| DeltaNode * | copy (rvsdg::Region *region, rvsdg::SubstitutionMap &smap) const override |
| Copy a node with substitutions. More... | |
| rvsdg::Output & | finalize (rvsdg::Output *result) |
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 |
Static Public Member Functions | |
| static DeltaNode * | Create (rvsdg::Region *parent, std::unique_ptr< DeltaOperation > op) |
Private Member Functions | |
| DeltaNode (rvsdg::Region *parent, std::unique_ptr< DeltaOperation > op) | |
Private Attributes | |
| std::unique_ptr< DeltaOperation > | Operation_ |
Delta node.
A delta node represents a global variable in the RVSDG. Its creation requires the invocation of two functions: Create() and finalize(). First, a delta node is created by invoking Create(). The delta's dependencies can then be added using the AddContextVar() method, and the body of the delta node can be created. Finally, the delta node can be finalized by invoking finalize().
The following snippet illustrates the creation of delta nodes:
|
overridedefaultnoexcept |
|
inlineprivate |
| DeltaNode::ContextVar jlm::rvsdg::DeltaNode::AddContextVar | ( | jlm::rvsdg::Output & | origin | ) |
|
inlinenoexcept |
|
overridevirtual |
Reimplemented from jlm::rvsdg::Node.
|
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.
|
inlinestatic |
Creates a delta node in the region parent with the detail information given in the operation struct.
After the invocation of Create(), the delta node has no inputs or outputs. Free variables can be added to the delta node using AddContextVar(). The generation of the node can be finished using the finalize() method.
| parent | The region where the delta node is created. |
| op | The delta node operation |
| rvsdg::Output & jlm::rvsdg::DeltaNode::finalize | ( | rvsdg::Output * | result | ) |
|
noexcept |
|
overridevirtualnoexcept |
Implements jlm::rvsdg::Node.
|
noexcept |
Maps bound variable reference to context variable.
| output | Region argument to delta subregion |
output must be an argument to the subregion of this nodeReturns the context variable description corresponding to this bound variable reference in the delta node region.
|
noexcept |
Maps input to context variable.
| input | Input to the delta node. |
input must be input to this node.Returns the context variable description corresponding to this input of the delta node. All inputs to the delta node are by definition bound context variables that are accessible in the subregion through the corresponding argument.
|
noexcept |
|
inline |
| size_t jlm::rvsdg::DeltaNode::RemoveDeltaInputsWhere | ( | const F & | match | ) |
Remove delta inputs and their respective arguments.
An input must match the condition specified by match and its argument must be dead.
| F | A type that supports the function call operator: bool operator(const cvinput&) |
| match | Defines the condition of the elements to remove. |
|
noexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
private |