|
Jlm
|
Namespaces | |
| base | |
| detail | |
Enumerations | |
| enum class | compare_result { undecidable , static_true , static_false } |
| enum class | TypeKind { Value , State } |
| The kinds of types supported in rvsdg. More... | |
Functions | |
| std::optional< std::vector< rvsdg::Output * > > | FlattenAssociativeBinaryOperation (const BinaryOperation &operation, const std::vector< rvsdg::Output * > &operands) |
| Flattens a cascade of the same binary operations into a single flattened binary operation. More... | |
| std::optional< std::vector< rvsdg::Output * > > | NormalizeBinaryOperation (const BinaryOperation &operation, const std::vector< rvsdg::Output * > &operands) |
| Applies the reductions implemented in the binary operations reduction functions. More... | |
| static jlm::rvsdg::Output * | reduce_parallel (const BinaryOperation &op, const std::vector< jlm::rvsdg::Output * > &operands) |
| static jlm::rvsdg::Output * | reduce_linear (const BinaryOperation &op, const std::vector< jlm::rvsdg::Output * > &operands) |
| std::optional< std::vector< rvsdg::Output * > > | NormalizeFlattenedBinaryOperation (const FlattenedBinaryOperation &operation, const std::vector< rvsdg::Output * > &operands) |
| Applies the reductions of the binary operation represented by the flattened binary operation. More... | |
| static constexpr enum BinaryOperation::flags | operator| (enum BinaryOperation::flags a, enum BinaryOperation::flags b) |
| static constexpr enum BinaryOperation::flags | operator& (enum BinaryOperation::flags a, enum BinaryOperation::flags b) |
| jlm::rvsdg::Output * | bitconcat (const std::vector< jlm::rvsdg::Output * > &operands) |
| static std::vector< std::shared_ptr< const BitType > > | GetTypesFromOperands (const std::vector< rvsdg::Output * > &args) |
| std::optional< std::vector< rvsdg::Output * > > | FlattenBitConcatOperation (const BitConcatOperation &, const std::vector< rvsdg::Output * > &operands) |
| jlm::rvsdg::Output * | bitslice (jlm::rvsdg::Output *operand, size_t low, size_t high) |
| Create bitslice. More... | |
| jlm::rvsdg::Output * | match (size_t nbits, const std::unordered_map< uint64_t, uint64_t > &mapping, uint64_t default_alternative, size_t nalternatives, jlm::rvsdg::Output *operand) |
| static bool | is_predicate_reducible (const GammaNode *gamma) |
| static void | perform_predicate_reduction (GammaNode *gamma) |
| static bool | perform_invariant_reduction (GammaNode *gamma) |
| static std::unordered_set< jlm::rvsdg::Output * > | is_control_constant_reducible (GammaNode *gamma) |
| static void | perform_control_constant_reduction (std::unordered_set< jlm::rvsdg::Output * > &outputs) |
| bool | ReduceGammaWithStaticallyKnownPredicate (Node &node) |
| bool | ReduceGammaControlConstant (Node &node) |
| bool | ReduceGammaInvariantVariables (Node &node) |
| std::optional< rvsdg::Output * > | GetGammaInvariantOrigin (const GammaNode &gamma, const GammaNode::ExitVar &exitvar) |
| Determines whether a gamma exit var is path-invariant. More... | |
| rvsdg::LambdaNode & | getSurroundingLambdaNode (rvsdg::Node &node) |
| const rvsdg::LambdaNode & | getSurroundingLambdaNode (const rvsdg::Node &node) |
| template<typename T , typename... Fns> | |
| void | MatchType (T &obj, const Fns &... fns) |
| Pattern match over subclass type of given object. More... | |
| template<typename T > | |
| void | MatchType (T &x) |
| template<typename T , typename Fn , typename... Fns> | |
| void | MatchType (T &x, const Fn &fn, const Fns &... fns) |
| template<typename T , typename... Fns> | |
| void | MatchTypeWithDefault (T &obj, const Fns &... fns) |
| Pattern match over subclass type of given object with default handler. More... | |
| template<typename T , typename Fn > | |
| CallableResultType< Fn >::type | MatchTypeWithDefault (T &, const Fn &fn) |
| template<typename T , typename Fn , typename... Fns> | |
| CallableResultType< Fn >::type | MatchTypeWithDefault (T &x, const Fn &fn, const Fns &... fns) |
| template<typename T , typename... Fns> | |
| void | MatchTypeOrFail (T &obj, const Fns &... fns) |
| Pattern match over subclass type of given object. More... | |
| template<typename T , typename Fn > | |
| CallableResultType< Fn >::type | MatchTypeOrFail (T &x, const Fn &fn) |
| template<typename T , typename Fn , typename... Fns> | |
| CallableResultType< Fn >::type | MatchTypeOrFail (T &x, const Fn &fn, const Fns &... fns) |
| static Input * | ComputeNextInput (const Input *input) |
| static Output * | ComputeNextOutput (const Output *output) |
| Output & | RouteToRegion (Output &output, Region ®ion) |
| template<class T > | |
| static bool | is (const jlm::rvsdg::Input &input) noexcept |
| template<class T > | |
| static bool | is (const jlm::rvsdg::Output *output) noexcept |
| template<class OperationType > | |
| bool | is (const Node *node) noexcept |
| Checks if the given node is not null, and has an operation of the specified type. More... | |
| template<typename TOperation > | |
| const TOperation * | tryGetOperation (const Node &node) noexcept |
| template<typename NodeType > | |
| NodeType * | TryGetOwnerNode (const rvsdg::Input &input) noexcept |
| Checks if this is an input to a node of specified type. More... | |
| template<typename NodeType > | |
| NodeType * | TryGetOwnerNode (const rvsdg::Output &output) noexcept |
| Checks if this is an output to a node of specified type. More... | |
| template<typename NodeType > | |
| NodeType & | AssertGetOwnerNode (const rvsdg::Input &input) |
| Asserts that this is an input to a node of specified type. More... | |
| template<typename NodeType > | |
| NodeType & | AssertGetOwnerNode (const rvsdg::Output &output) |
| Asserts that this is an output of a node of specified type. More... | |
| template<typename OperationType > | |
| bool | IsOwnerNodeOperation (const rvsdg::Input &input) noexcept |
| Checks if the input belongs to a node of the specified operation type. More... | |
| template<typename OperationType > | |
| bool | IsOwnerNodeOperation (const rvsdg::Output &output) noexcept |
| Checks if the output belongs to a node of the specified operation type. More... | |
| Region * | TryGetOwnerRegion (const rvsdg::Input &input) noexcept |
| Region * | TryGetOwnerRegion (const rvsdg::Output &output) noexcept |
| static std::vector< jlm::rvsdg::Output * > | operands (const Node *node) |
| static std::vector< jlm::rvsdg::Output * > | outputs (const Node *node) |
| static std::vector< Output * > | Outputs (const Node &node, const size_t startIdx, const size_t size) |
| static void | divert_users (Node *node, const std::vector< Output * > &outputs) |
| template<class TOperation > | |
| std::optional< std::vector< Output * > > | NormalizeSequence (const std::vector< NodeNormalization< TOperation >> &nodeNormalizations, const TOperation &operation, const std::vector< Output * > &operands) |
| template<class TOperation > | |
| bool | ReduceNode (const NodeNormalization< TOperation > &nodeNormalization, SimpleNode &node) |
| template<class T > | |
| static bool | is (const Operation &operation) noexcept |
| std::unordered_map< const Node *, size_t > | computeDepthMap (const Region ®ion) |
| size_t | nnodes (const jlm::rvsdg::Region *region) noexcept |
| size_t | nstructnodes (const rvsdg::Region *region) noexcept |
| size_t | nsimpnodes (const rvsdg::Region *region) noexcept |
| size_t | ninputs (const rvsdg::Region *region) noexcept |
| static void | remove (Node *node) |
| template<typename NodeType > | |
| NodeType * | TryGetRegionParentNode (const rvsdg::Input &input) noexcept |
| Checks if this is a result of a region inside a node of specified type. More... | |
| template<typename NodeType > | |
| NodeType * | TryGetRegionParentNode (const rvsdg::Output &output) noexcept |
| Checks if this is an argument of a region inside a node of specified type. More... | |
| template<typename NodeType > | |
| NodeType & | AssertGetRegionParentNode (const rvsdg::Input &input) |
| Asserts that this is a result of a region inside a node of specified type. More... | |
| template<typename NodeType > | |
| NodeType & | AssertGetRegionParentNode (const rvsdg::Output &output) |
| Asserts that this is an argument of a region inside a node of specified type. More... | |
| std::optional< std::vector< rvsdg::Output * > > | NormalizeSimpleOperationCommonNodeElimination (Region ®ion, const SimpleOperation &operation, const std::vector< rvsdg::Output * > &operands) |
| Performs common node elimination for a given operation and operands in a region. More... | |
| template<typename OperatorType , typename... OperatorArguments> | |
| SimpleNode & | CreateOpNode (const std::vector< Output * > &operands, OperatorArguments... operatorArguments) |
| Creates a simple node characterized by its operator. More... | |
| template<typename OperatorType , typename... OperatorArguments> | |
| SimpleNode & | CreateOpNode (Region ®ion, OperatorArguments... operatorArguments) |
| Creates a simple node characterized by its operator. More... | |
| template<typename TOperation > | |
| std::pair< SimpleNode *, const TOperation * > | TryGetSimpleNodeAndOptionalOp (const Input &input) noexcept |
| Checks if this is an input to a SimpleNode and of specified operation type. More... | |
| template<typename TOperation > | |
| std::pair< SimpleNode *, const TOperation * > | TryGetSimpleNodeAndOptionalOp (const Output &output) noexcept |
| Checks if this is an output to a SimpleNode and of specified operation type. More... | |
| template<typename TOperation > | |
| std::pair< const SimpleNode *, const TOperation * > | TryGetSimpleNodeAndOptionalOp (const Node &node) noexcept |
| Checks if the node is a SimpleNode of the specified operation type. More... | |
| static std::string | ToString (const TypeKind kind) |
| static bool | ThetaLoopVarIsInvariant (const ThetaNode::LoopVar &loopVar) noexcept |
| static Output & | mapGammaArgumentToOrigin (GammaNode &gammaNode, Output &output) |
| Output & | traceOutputIntraProcedurally (Output &output) |
| Output & | traceOutput (Output &output) |
| const Output & | traceOutputIntraProcedurally (const Output &output) |
| const Output & | traceOutput (const Output &output) |
| template<class T > | |
| static bool | is (const jlm::rvsdg::Type &type) noexcept |
| template<class T > | |
| static bool | is (const std::shared_ptr< const jlm::rvsdg::Type > &type) noexcept |
| std::optional< std::vector< rvsdg::Output * > > | NormalizeUnaryOperation (const UnaryOperation &operation, const std::vector< rvsdg::Output * > &operands) |
| Applies the reductions implemented in the unary operations reduction functions. More... | |
| static std::string | region_to_string (const rvsdg::Region *region, size_t depth, std::unordered_map< const Output *, std::string > &) |
| static std::string | indent (size_t depth) |
| static std::string | create_port_name (const jlm::rvsdg::Output *port, std::unordered_map< const Output *, std::string > &map) |
| static std::string | node_to_string (const Node *node, size_t depth, std::unordered_map< const Output *, std::string > &map) |
| static std::string | region_header (const rvsdg::Region *region, std::unordered_map< const Output *, std::string > &map) |
| static std::string | region_body (const Region *region, const size_t depth, std::unordered_map< const Output *, std::string > &map) |
| static std::string | region_footer (const rvsdg::Region *region, std::unordered_map< const Output *, std::string > &map) |
| std::string | view (const rvsdg::Region *region) |
| std::string | view (const rvsdg::Region *region, std::unordered_map< const Output *, std::string > &map) |
| void | view (const rvsdg::Region *region, FILE *out) |
| static std::string | xml_header () |
| static std::string | xml_footer () |
| static std::string | id (const jlm::rvsdg::Output *port) |
| static std::string | id (const jlm::rvsdg::Input *port) |
| static std::string | id (const Node *node) |
| static std::string | id (const rvsdg::Region *region) |
| static std::string | argument_tag (const std::string &id) |
| static std::string | result_tag (const std::string &id) |
| static std::string | input_tag (const std::string &id) |
| static std::string | output_tag (const std::string &id) |
| static std::string | node_starttag (const std::string &id, const std::string &name, const std::string &type) |
| static std::string | node_endtag () |
| static std::string | region_starttag (const std::string &id) |
| static std::string | region_endtag (const std::string &) |
| static std::string | edge_tag (const std::string &srcid, const std::string &dstid) |
| static std::string | type (const Node *n) |
| static std::string | convert_region (const jlm::rvsdg::Region *region) |
| static std::string | convert_simple_node (const jlm::rvsdg::SimpleNode *node) |
| static std::string | convert_structural_node (const rvsdg::StructuralNode *node) |
| static std::string | convert_node (const Node *node) |
| std::string | to_xml (const rvsdg::Region *region) |
| void | view_xml (const rvsdg::Region *region, FILE *out) |
| void | view (const Graph &graph, FILE *out) |
Variables | |
| static const binop_reduction_path_t | binop_reduction_none = 0 |
| static const binop_reduction_path_t | binop_reduction_constants = 1 |
| static const binop_reduction_path_t | binop_reduction_merge = 2 |
| static const binop_reduction_path_t | binop_reduction_lfold = 3 |
| static const binop_reduction_path_t | binop_reduction_rfold = 4 |
| static const binop_reduction_path_t | binop_reduction_lneutral = 5 |
| static const binop_reduction_path_t | binop_reduction_rneutral = 6 |
| static const binop_reduction_path_t | binop_reduction_factor = 7 |
| const char | BitNegateLabel [] = "BitNegate" |
| const char | BitNotLabel [] = "BitNot" |
| const char | BitAddLabel [] = "BitAdd" |
| const char | BitAndLabel [] = "BitAnd" |
| const char | BitAShrLabel [] = "BitAShr" |
| const char | BitMulLabel [] = "BitMul" |
| const char | BitOrLabel [] = "BitOr" |
| const char | BitSDivLabel [] = "BitSDiv" |
| const char | BitShlLabel [] = "BitShl" |
| const char | BitShrLabel [] = "BitShr" |
| const char | BitSModLabel [] = "BitSMod" |
| const char | BitSMulHLabel [] = "BitSMulH" |
| const char | BitSubLabel [] = "BitSub" |
| const char | BitUDivLabel [] = "BitUDiv" |
| const char | BitUModLabel [] = "BitUMod" |
| const char | BitUMulHLabel [] = "BitUMulH" |
| const char | BitXorLabel [] = "BitXor" |
| const char | BitEqLabel [] = "BitEq" |
| const char | BitNeLabel [] = "BitNe" |
| const char | BitSgeLabel [] = "BitSge" |
| const char | BitSgtLabel [] = "BitSgt" |
| const char | BitSleLabel [] = "BitSle" |
| const char | BitSltLabel [] = "BitSlt" |
| const char | BitUgeLabel [] = "BitUge" |
| const char | BitUgtLabel [] = "BitUgt" |
| const char | BitUleLabel [] = "BitUle" |
| const char | BitUltLabel [] = "BitUlt" |
| static const unop_reduction_path_t | unop_reduction_none = 0 |
| static const unop_reduction_path_t | unop_reduction_constant = 1 |
| static const unop_reduction_path_t | unop_reduction_idempotent = 2 |
| static const unop_reduction_path_t | unop_reduction_inverse = 4 |
| static const unop_reduction_path_t | unop_reduction_narrow = 5 |
| static const unop_reduction_path_t | unop_reduction_distribute = 6 |
| typedef jlm::util::IntrusiveList<RegionArgument, RegionArgument::structural_input_accessor> jlm::rvsdg::argument_list |
Definition at line 89 of file structural-node.hpp.
| typedef size_t jlm::rvsdg::binop_reduction_path_t |
Definition at line 19 of file binary.hpp.
| using jlm::rvsdg::bitadd_op = typedef MakeBitBinaryOperation< reduce_add, BitAddLabel, BinaryOperation::flags::associative | BinaryOperation::flags::commutative> |
Definition at line 95 of file arithmetic.hpp.
| using jlm::rvsdg::bitand_op = typedef MakeBitBinaryOperation< reduce_and, BitAndLabel, BinaryOperation::flags::associative | BinaryOperation::flags::commutative> |
Definition at line 106 of file arithmetic.hpp.
| using jlm::rvsdg::bitashr_op = typedef MakeBitBinaryOperation<reduce_ashr, BitAShrLabel, BinaryOperation::flags::none> |
Definition at line 117 of file arithmetic.hpp.
| using jlm::rvsdg::biteq_op = typedef MakeBitComparisonOperation<reduce_eq, BitEqLabel, BinaryOperation::flags::commutative> |
Definition at line 54 of file comparison.hpp.
| using jlm::rvsdg::bitmul_op = typedef MakeBitBinaryOperation< reduce_mul, BitMulLabel, BinaryOperation::flags::associative | BinaryOperation::flags::commutative> |
Definition at line 125 of file arithmetic.hpp.
| using jlm::rvsdg::bitne_op = typedef MakeBitComparisonOperation<reduce_ne, BitNeLabel, BinaryOperation::flags::commutative> |
Definition at line 63 of file comparison.hpp.
| using jlm::rvsdg::bitneg_op = typedef MakeBitUnaryOperation<reduce_neg, BitNegateLabel> |
Definition at line 85 of file arithmetic.hpp.
| using jlm::rvsdg::bitnot_op = typedef MakeBitUnaryOperation<reduce_not, BitNotLabel> |
Definition at line 90 of file arithmetic.hpp.
| using jlm::rvsdg::bitor_op = typedef MakeBitBinaryOperation< reduce_or, BitOrLabel, BinaryOperation::flags::associative | BinaryOperation::flags::commutative> |
Definition at line 136 of file arithmetic.hpp.
| using jlm::rvsdg::bitsdiv_op = typedef MakeBitBinaryOperation<reduce_sdiv, BitSDivLabel, BinaryOperation::flags::none> |
Definition at line 147 of file arithmetic.hpp.
| using jlm::rvsdg::bitsge_op = typedef MakeBitComparisonOperation<reduce_sge, BitSgeLabel, BinaryOperation::flags::none> |
Definition at line 72 of file comparison.hpp.
| using jlm::rvsdg::bitsgt_op = typedef MakeBitComparisonOperation<reduce_sgt, BitSgtLabel, BinaryOperation::flags::none> |
Definition at line 80 of file comparison.hpp.
| using jlm::rvsdg::bitshl_op = typedef MakeBitBinaryOperation<reduce_shl, BitShlLabel, BinaryOperation::flags::none> |
Definition at line 155 of file arithmetic.hpp.
| using jlm::rvsdg::bitshr_op = typedef MakeBitBinaryOperation<reduce_shr, BitShrLabel, BinaryOperation::flags::none> |
Definition at line 160 of file arithmetic.hpp.
| using jlm::rvsdg::bitsle_op = typedef MakeBitComparisonOperation<reduce_sle, BitSleLabel, BinaryOperation::flags::none> |
Definition at line 88 of file comparison.hpp.
| using jlm::rvsdg::bitslt_op = typedef MakeBitComparisonOperation<reduce_slt, BitSltLabel, BinaryOperation::flags::none> |
Definition at line 96 of file comparison.hpp.
| using jlm::rvsdg::bitsmod_op = typedef MakeBitBinaryOperation<reduce_smod, BitSModLabel, BinaryOperation::flags::none> |
Definition at line 165 of file arithmetic.hpp.
| using jlm::rvsdg::bitsmulh_op = typedef MakeBitBinaryOperation<reduce_smulh, BitSMulHLabel, BinaryOperation::flags::commutative> |
Definition at line 173 of file arithmetic.hpp.
| using jlm::rvsdg::bitsub_op = typedef MakeBitBinaryOperation<reduce_sub, BitSubLabel, BinaryOperation::flags::none> |
Definition at line 182 of file arithmetic.hpp.
| using jlm::rvsdg::bitudiv_op = typedef MakeBitBinaryOperation<reduce_udiv, BitUDivLabel, BinaryOperation::flags::none> |
Definition at line 187 of file arithmetic.hpp.
| using jlm::rvsdg::bituge_op = typedef MakeBitComparisonOperation<reduce_uge, BitUgeLabel, BinaryOperation::flags::none> |
Definition at line 104 of file comparison.hpp.
| using jlm::rvsdg::bitugt_op = typedef MakeBitComparisonOperation<reduce_ugt, BitUgtLabel, BinaryOperation::flags::none> |
Definition at line 112 of file comparison.hpp.
| using jlm::rvsdg::bitule_op = typedef MakeBitComparisonOperation<reduce_ule, BitUleLabel, BinaryOperation::flags::none> |
Definition at line 120 of file comparison.hpp.
| using jlm::rvsdg::bitult_op = typedef MakeBitComparisonOperation<reduce_ult, BitUltLabel, BinaryOperation::flags::none> |
Definition at line 128 of file comparison.hpp.
| using jlm::rvsdg::bitumod_op = typedef MakeBitBinaryOperation<reduce_umod, BitUModLabel, BinaryOperation::flags::none> |
Definition at line 195 of file arithmetic.hpp.
| using jlm::rvsdg::bitumulh_op = typedef MakeBitBinaryOperation<reduce_umulh, BitUMulHLabel, BinaryOperation::flags::commutative> |
Definition at line 203 of file arithmetic.hpp.
| using jlm::rvsdg::bitxor_op = typedef MakeBitBinaryOperation< reduce_xor, BitXorLabel, BinaryOperation::flags::associative | BinaryOperation::flags::commutative> |
Definition at line 212 of file arithmetic.hpp.
| using jlm::rvsdg::BottomUpConstTraverser = typedef detail::BottomUpTraverserGeneric<true> |
Traverser for visiting every node in a const region in a bottom up order.
Definition at line 326 of file traverser.hpp.
| using jlm::rvsdg::BottomUpTraverser = typedef detail::BottomUpTraverserGeneric<false> |
Traverser for visiting every node in a region in a bottom up order.
Definition at line 320 of file traverser.hpp.
| using jlm::rvsdg::NodeNormalization = typedef std::function< std::optional<std::vector<Output *> >(const TOperation &, const std::vector<Output *> &)> |
Definition at line 24 of file NodeNormalization.hpp.
| typedef jlm::util::IntrusiveList<RegionResult, RegionResult::structural_output_accessor> jlm::rvsdg::result_list |
Definition at line 115 of file structural-node.hpp.
| using jlm::rvsdg::TopDownConstTraverser = typedef detail::TopDownTraverserGeneric<true> |
Traverser for visiting every node in a const region in a top down order.
Definition at line 314 of file traverser.hpp.
| using jlm::rvsdg::TopDownTraverser = typedef detail::TopDownTraverserGeneric<false> |
Traverser for visiting every node in a region in a top down order.
Definition at line 308 of file traverser.hpp.
| typedef size_t jlm::rvsdg::unop_reduction_path_t |
|
strong |
| Enumerator | |
|---|---|
| undecidable | |
| static_true | |
| static_false | |
Definition at line 85 of file bitoperation-classes.hpp.
|
strong |
The kinds of types supported in rvsdg.
Note: there might be reasons to make this extensible eventually.
|
inlinestatic |
|
inline |
Asserts that this is an input to a node of specified type.
| NodeType | The node type to be matched against. |
| input | Input to be checked. |
Checks if the specified input belongs to a node of requested type. If this is the case, returns a reference to the node of matched type, otherwise throws std::logic_error.
See Inspecting the graph and matching against different operations.
|
inline |
Asserts that this is an output of a node of specified type.
| NodeType | The node type to be matched against. |
| output | Output to be checked. |
Checks if the specified output belongs to a node of requested type. If this is the case, returns a reference to the node of matched type, otherwise throws std::logic_error.
See Inspecting the graph and matching against different operations.
|
inline |
Asserts that this is a result of a region inside a node of specified type.
| NodeType | The node type to be matched against. |
| input | Input to be checked. |
Checks if the specified input is a region exit result belonging to a node of specified type. If this is the case, returns a reference to the node of matched type, otherwise throws an exception.
See Inspecting the graph and matching against different operations.
Definition at line 1042 of file region.hpp.
|
inline |
Asserts that this is an argument of a region inside a node of specified type.
| NodeType | The node type to be matched against. |
| output | Output to be checked. |
Checks if the specified input is a region entry argument belonging to a node of specified type. If this is the case, returns a reference to the node of matched type, otherwise throws an exception.
See Inspecting the graph and matching against different operations.
Definition at line 1073 of file region.hpp.
| jlm::rvsdg::Output * jlm::rvsdg::bitconcat | ( | const std::vector< jlm::rvsdg::Output * > & | operands | ) |
Definition at line 16 of file concat.cpp.
| jlm::rvsdg::Output * jlm::rvsdg::bitslice | ( | jlm::rvsdg::Output * | operand, |
| size_t | low, | ||
| size_t | high | ||
| ) |
Computes the depth for all nodes in region.
| region | The region for which to compute the depth of its nodes. |
Definition at line 609 of file region.cpp.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
static |
| SimpleNode& jlm::rvsdg::CreateOpNode | ( | const std::vector< Output * > & | operands, |
| OperatorArguments... | operatorArguments | ||
| ) |
Creates a simple node characterized by its operator.
| OperatorType | The type of operator wrapped by the node. |
| OperatorArguments | Argument types of the operator to be constructed (should be implied, just specify the OperatorType). |
| operands | The operands to the operator (i.e. inputs to the node to be constructed). |
| operatorArguments | Constructor arguments for the operator to be constructed. |
operands must be non-empty, must be in the same region, and their types must match the operator constructed by this call.Constructs a new operator of type OperatorType using operatorArguments as constructor arguments. Creates a simple node using the constructed operator and the given operands as operands to the constructed operator.
Usage example:
Definition at line 128 of file simple-node.hpp.
| SimpleNode& jlm::rvsdg::CreateOpNode | ( | Region & | region, |
| OperatorArguments... | operatorArguments | ||
| ) |
Creates a simple node characterized by its operator.
| OperatorType | The type of operator wrapped by the node. |
| OperatorArguments | Argument types of the operator to be constructed (should be implied, just specify the OperatorType). |
| region | The region to create the node in. |
| operatorArguments | Constructor arguments for the operator to be constructed. |
Constructs a new operator of type OperatorType using operatorArguments as constructor arguments. Creates a simple node using the constructed operator with no operands in the specified region.
Usage example:
Definition at line 170 of file simple-node.hpp.
|
inlinestatic |
| std::optional< std::vector< rvsdg::Output * > > jlm::rvsdg::FlattenAssociativeBinaryOperation | ( | const BinaryOperation & | operation, |
| const std::vector< rvsdg::Output * > & | operands | ||
| ) |
Flattens a cascade of the same binary operations into a single flattened binary operation.
o1 = binaryNode i1 i2 o2 = binaryNode o1 i3 => o2 = flattenedBinaryNode i1 i2 i3
| operation | The binary operation on which the transformation is performed. |
| operands | The operands of the binary node. |
Definition at line 64 of file binary.cpp.
| std::optional< std::vector< rvsdg::Output * > > jlm::rvsdg::FlattenBitConcatOperation | ( | const BitConcatOperation & | , |
| const std::vector< rvsdg::Output * > & | operands | ||
| ) |
Definition at line 154 of file concat.cpp.
| std::optional< rvsdg::Output * > jlm::rvsdg::GetGammaInvariantOrigin | ( | const GammaNode & | gamma, |
| const GammaNode::ExitVar & | exitvar | ||
| ) |
Determines whether a gamma exit var is path-invariant.
| gamma | The gamma node which we are testing for. |
| exitvar | Exit variable of the gamma node. |
exitvar must be an GammaNode::ExitVar of gamma Checks whether the gamma effectively assigns the same input value to this exit variable on all paths of the gamma. If this is the case, it returns the origin of the common input.
| const rvsdg::LambdaNode & jlm::rvsdg::getSurroundingLambdaNode | ( | const rvsdg::Node & | node | ) |
Definition at line 285 of file lambda.cpp.
| rvsdg::LambdaNode & jlm::rvsdg::getSurroundingLambdaNode | ( | rvsdg::Node & | node | ) |
Traverses from the given node up the region hierarchy until a lambda node is found. If the node is itself a lambda node, it is returned.
| node | the starting node |
node | std::logic_error | if node is not within a lambda node |
Definition at line 272 of file lambda.cpp.
|
static |
Definition at line 143 of file concat.cpp.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
static |
|
inlinestatic |
|
inlinestaticnoexcept |
|
inlinestaticnoexcept |
|
inlinestaticnoexcept |
|
inlinenoexcept |
Checks if the given node is not null, and has an operation of the specified type.
| OperationType | The subclass of operation to check for. |
| node | The node being checked. |
|
inlinestaticnoexcept |
Definition at line 47 of file operation.hpp.
|
inlinestaticnoexcept |
|
static |
|
static |
|
noexcept |
Checks if the input belongs to a node of the specified operation type.
| OperationType | The subclass of Operation to check for. |
| input | The output being checked. |
|
noexcept |
Checks if the output belongs to a node of the specified operation type.
| OperationType | The subclass of Operation to check for. |
| output | The output being checked. |
| jlm::rvsdg::Output * jlm::rvsdg::match | ( | size_t | nbits, |
| const std::unordered_map< uint64_t, uint64_t > & | mapping, | ||
| uint64_t | default_alternative, | ||
| size_t | nalternatives, | ||
| jlm::rvsdg::Output * | operand | ||
| ) |
Definition at line 179 of file control.cpp.
| void jlm::rvsdg::MatchType | ( | T & | obj, |
| const Fns &... | fns | ||
| ) |
Pattern match over subclass type of given object.
| obj | Object to be matched over |
| fns | Functions to be attempted, in order. |
Each of the callable function objects must take a reference to a subclass of the given object. Pattern matching tries to cast the object to each given subclass in turn, and calls the first applicable handler function
| void jlm::rvsdg::MatchType | ( | T & | x | ) |
Definition at line 129 of file MatchType.hpp.
| void jlm::rvsdg::MatchType | ( | T & | x, |
| const Fn & | fn, | ||
| const Fns &... | fns | ||
| ) |
Definition at line 135 of file MatchType.hpp.
| void jlm::rvsdg::MatchTypeOrFail | ( | T & | obj, |
| const Fns &... | fns | ||
| ) |
Pattern match over subclass type of given object.
| obj | Object to be matched over |
| fns | Functions to be attempted, in order. |
Each of the callable function objects must take a reference to a subclass of the given object. Pattern matching tries to cast the object to each given subclass in turn, and calls the first applicable handler function. If no handler function applies, this is considered a logic error (it should never occur).
| CallableResultType<Fn>::type jlm::rvsdg::MatchTypeOrFail | ( | T & | x, |
| const Fn & | fn | ||
| ) |
Definition at line 215 of file MatchType.hpp.
| CallableResultType<Fn>::type jlm::rvsdg::MatchTypeOrFail | ( | T & | x, |
| const Fn & | fn, | ||
| const Fns &... | fns | ||
| ) |
Definition at line 231 of file MatchType.hpp.
| CallableResultType<Fn>::type jlm::rvsdg::MatchTypeWithDefault | ( | T & | , |
| const Fn & | fn | ||
| ) |
Definition at line 172 of file MatchType.hpp.
| void jlm::rvsdg::MatchTypeWithDefault | ( | T & | obj, |
| const Fns &... | fns | ||
| ) |
Pattern match over subclass type of given object with default handler.
| obj | Object to be matched over |
| fns | Functions to be attempted, in order. Last callable must not take any parameters and is called as failure fallback. |
Each of the callable function objects must take a reference to a subclass of the given object. Pattern matching tries to cast the object to each given subclass in turn, and calls the first applicable handler function. The last callable must not take any parameters and will be called when neither of the previous handlers matched.
| CallableResultType<Fn>::type jlm::rvsdg::MatchTypeWithDefault | ( | T & | x, |
| const Fn & | fn, | ||
| const Fns &... | fns | ||
| ) |
Definition at line 180 of file MatchType.hpp.
|
noexcept |
Definition at line 682 of file region.cpp.
|
noexcept |
Definition at line 629 of file region.cpp.
|
inlinestatic |
|
inlinestatic |
| std::optional< std::vector< rvsdg::Output * > > jlm::rvsdg::NormalizeBinaryOperation | ( | const BinaryOperation & | operation, |
| const std::vector< rvsdg::Output * > & | operands | ||
| ) |
Applies the reductions implemented in the binary operations reduction functions.
| operation | The binary operation on which the transformation is performed. |
| operands | The operands of the binary node. |
Definition at line 112 of file binary.cpp.
| std::optional< std::vector< rvsdg::Output * > > jlm::rvsdg::NormalizeFlattenedBinaryOperation | ( | const FlattenedBinaryOperation & | operation, |
| const std::vector< rvsdg::Output * > & | operands | ||
| ) |
Applies the reductions of the binary operation represented by the flattened binary operation.
| operation | The flattened binary operation on which the transformation is performed. |
| operands | The operands of the flattened binary node. |
Definition at line 253 of file binary.cpp.
| std::optional<std::vector<Output *> > jlm::rvsdg::NormalizeSequence | ( | const std::vector< NodeNormalization< TOperation >> & | nodeNormalizations, |
| const TOperation & | operation, | ||
| const std::vector< Output * > & | operands | ||
| ) |
Definition at line 29 of file NodeNormalization.hpp.
| std::optional< std::vector< rvsdg::Output * > > jlm::rvsdg::NormalizeSimpleOperationCommonNodeElimination | ( | Region & | region, |
| const SimpleOperation & | operation, | ||
| const std::vector< rvsdg::Output * > & | operands | ||
| ) |
Performs common node elimination for a given operation and operands in a region.
| region | The region in which common node elimination is performed. |
| operation | The simple operation on which the transformation is performed. |
| operands | The operands of the simple node. |
Definition at line 85 of file simple-node.cpp.
| std::optional< std::vector< rvsdg::Output * > > jlm::rvsdg::NormalizeUnaryOperation | ( | const UnaryOperation & | operation, |
| const std::vector< rvsdg::Output * > & | operands | ||
| ) |
Applies the reductions implemented in the unary operations reduction functions.
| operation | The unary operation on which the transformation is performed. |
| operands | The single(!) operand of the unary node. It should only be a single operand. |
|
noexcept |
Definition at line 662 of file region.cpp.
|
noexcept |
Definition at line 645 of file region.cpp.
|
inlinestatic |
|
staticconstexpr |
Definition at line 171 of file binary.hpp.
|
staticconstexpr |
Definition at line 171 of file binary.hpp.
|
inlinestatic |
|
inlinestatic |
Returns a subset of the outputs from a node as a vector.
| node | The node from which the outputs are taken. |
| startIdx | The index of the first output. |
| size | The number of outputs that are returned. |
startIdx + size must be smaller or equal than the number of outputs of node.
|
inlinestatic |
|
static |
|
static |
|
static |
|
static |
Definition at line 187 of file binary.cpp.
|
static |
Definition at line 165 of file binary.cpp.
| bool jlm::rvsdg::ReduceGammaControlConstant | ( | Node & | node | ) |
Reduces the predicate of a gamma node g1 from the constants that originate from another gamma node g2 to the predicate of g2.
p2 = gamma p1 [] x = 0 [p2 <= x] [] y = 1 [p2 <= y] ... = gamma p2 => p2 = gamma p1 [] x = 0 [p2 <= x] [] y = 1 [p2 <= y] ... = gamma p1
| node | A gamma node that is supposed to be reduced. |
| bool jlm::rvsdg::ReduceGammaInvariantVariables | ( | Node & | node | ) |
Reduces all invariant variables of gamma node and diverts the users of the gamma node's exit variables to the respective origin of the invariant variable. x = ... xo = gamma p xi [xa <= xi] [xr <= xa] [xa <= xi] [xr <= xa] ... = anyOp xo => x = ... xo = gamma p xi [xa <= xi] [xo <= xa] [xa <= xi] [xo <= xa] ... = anyOp x //xo changed to x
| node | A gamma node that is supposed to be reduced. |
| bool jlm::rvsdg::ReduceGammaWithStaticallyKnownPredicate | ( | Node & | node | ) |
Reduces a gamma node with a statically known predicate to the respective subregion determined by the value of the predicate.
c = gamma 0 [] x = 45 [c <= x] [] y = 37 [c <= y] ... = add c + 5 => c = 45 ... = add c + 5
| node | A gamma node that is supposed to be reduced. |
| bool jlm::rvsdg::ReduceNode | ( | const NodeNormalization< TOperation > & | nodeNormalization, |
| SimpleNode & | node | ||
| ) |
Definition at line 47 of file NodeNormalization.hpp.
|
inlinestatic |
|
static |
|
static |
|
inlinestatic |
|
static |
|
inlinestatic |
Definition at line 932 of file region.hpp.
|
inlinestatic |
Routes output through the region tree to region by creating the necessary inputs and region arguments for the encountered nodes.
output is not an ancestor of region.| output | The value that is supposed to be routed to region. |
| region | The region the value is supposed to be routed to. |
region.
|
inlinestaticnoexcept |
| std::string jlm::rvsdg::to_xml | ( | const rvsdg::Region * | region | ) |
|
static |
Definition at line 17 of file TestType.cpp.
Traces output through the RVSDG. The function is capable of tracing through everything traceOutputIntraProcedurally is, in addition to:
It will not trace through phi recursion variables
| output | the output to trace. |
Traces output intra-procedurally through the RVSDG. The function is capable of tracing:
Tracing stops when a lambda function argument or context argument is reached.
| output | The Output that needs to be traced. |
|
noexcept |
|
inlinenoexcept |
Checks if this is an input to a node of specified type.
| NodeType | The node type to be matched against. |
| input | Input to be checked. |
Checks if the specified input belongs to a node of requested type. If this is the case, returns a pointer to the node of matched type. If this is not the case (because either this as a region exit result or its owning node is not of the requested type), returns nullptr.
See Inspecting the graph and matching against different operations.
|
inlinenoexcept |
Checks if this is an output to a node of specified type.
| NodeType | The node type to be matched against. |
| output | Output to be checked. |
Checks if the specified output belongs to a node of requested type. If this is the case, returns a pointer to the node of matched type. If this is not the case (because either this as a region entry argument or its owning node is not of the requested type), returns nullptr.
See Inspecting the graph and matching against different operations.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Checks if this is a result of a region inside a node of specified type.
| NodeType | The node type to be matched against. |
| input | Input to be checked. |
Checks if the specified input is a region exit result belonging to a node of specified type. If this is the case, returns a pointer to the node of matched type. If this is not the case (because either this is an input to a node or or because the node owning the region is of a different kind, or because this is the root region), returns nullptr.
See Inspecting the graph and matching against different operations.
Definition at line 972 of file region.hpp.
|
inlinenoexcept |
Checks if this is an argument of a region inside a node of specified type.
| NodeType | The node type to be matched against. |
| output | Output to be checked. |
Checks if the specified input is a region entry argument belonging to a node of specified type. If this is the case, returns a pointer to the node of matched type. If this is not the case (because either this is an input to a node or or because the node owning the region is of a different kind, or because this is the root region), returns nullptr.
See Inspecting the graph and matching against different operations.
Definition at line 1008 of file region.hpp.
|
noexcept |
Checks if this is an input to a SimpleNode and of specified operation type.
| TOperation | The operation type to be matched against. |
| input | Input to be checked. |
input is not a SimpleNode, then <nullptr, nullptr> is returned. If the owner of input is a SimpleNode but not of the correct operation type, then <SimpleNode*, nullptr> are returned. Otherwise, <SimpleNode*, TOperation*> are returned.Checks if the specified input belongs to a SimpleNode of requested operation type. If this is the case, returns a pair of pointers to the node and operation of matched type.
See Inspecting the graph and matching against different operations.
Definition at line 200 of file simple-node.hpp.
|
noexcept |
Checks if the node is a SimpleNode of the specified operation type.
| TOperation | The operation type to be matched against. |
| node | Node to be checked. |
node is not a SimpleNode, then <nullptr, nullptr> is returned. If is a SimpleNode of a different operation type, then <SimpleNode*, nullptr> is returned. Otherwise, <SimpleNode*, TOperation*> is returned.Checks if the specified node is a SimpleNode of the requested operation type. If this is the case, returns a pair of pointers to the SimpleNode and operation.
See Inspecting the graph and matching against different operations.
Definition at line 275 of file simple-node.hpp.
|
noexcept |
Checks if this is an output to a SimpleNode and of specified operation type.
| TOperation | The operation type to be matched against. |
| output | Output to be checked. |
output is not a SimpleNode, then <nullptr, nullptr> is returned. If the owner of output is a SimpleNode but not of the correct operation type, then <SimpleNode*, nullptr> are returned. Otherwise, <SimpleNode*, TOperation*> are returned.Checks if the specified output belongs to a SimpleNode of requested operation type. If this is the case, returns a pair of pointers to the node and operation of matched type.
See Inspecting the graph and matching against different operations.
Definition at line 238 of file simple-node.hpp.
|
inlinestatic |
|
inline |
| std::string jlm::rvsdg::view | ( | const rvsdg::Region * | region | ) |
Prints the given rvsdg region to a string, through recursive traversal of nodes and subregions. All outputs are given unique names to show dataflow in the graph.
| region | the region to be printed |
| void jlm::rvsdg::view | ( | const rvsdg::Region * | region, |
| FILE * | out | ||
| ) |
| std::string jlm::rvsdg::view | ( | const rvsdg::Region * | region, |
| std::unordered_map< const Output *, std::string > & | map | ||
| ) |
Prints the given rvsdg region to a string, and exposes the unique name given to each output.
| region | the region to be printed |
| map | the map where each rvsdg::output is mapped to its unique name. Outputs without names will have a name added. |
| void jlm::rvsdg::view_xml | ( | const rvsdg::Region * | region, |
| FILE * | out | ||
| ) |
|
static |
Definition at line 205 of file binary.hpp.
|
static |
Definition at line 217 of file binary.hpp.
|
static |
Definition at line 209 of file binary.hpp.
|
static |
Definition at line 213 of file binary.hpp.
|
static |
Definition at line 207 of file binary.hpp.
|
static |
Definition at line 203 of file binary.hpp.
|
static |
Definition at line 211 of file binary.hpp.
|
static |
Definition at line 215 of file binary.hpp.
| const char jlm::rvsdg::BitAddLabel = "BitAdd" |
Definition at line 54 of file arithmetic.cpp.
| const char jlm::rvsdg::BitAndLabel = "BitAnd" |
Definition at line 69 of file arithmetic.cpp.
| const char jlm::rvsdg::BitAShrLabel = "BitAShr" |
Definition at line 84 of file arithmetic.cpp.
| const char jlm::rvsdg::BitEqLabel = "BitEq" |
Definition at line 22 of file comparison.cpp.
| const char jlm::rvsdg::BitMulLabel = "BitMul" |
Definition at line 96 of file arithmetic.cpp.
| const char jlm::rvsdg::BitNegateLabel = "BitNegate" |
Definition at line 30 of file arithmetic.cpp.
| const char jlm::rvsdg::BitNeLabel = "BitNe" |
Definition at line 37 of file comparison.cpp.
| const char jlm::rvsdg::BitNotLabel = "BitNot" |
Definition at line 42 of file arithmetic.cpp.
| const char jlm::rvsdg::BitOrLabel = "BitOr" |
Definition at line 111 of file arithmetic.cpp.
| const char jlm::rvsdg::BitSDivLabel = "BitSDiv" |
Definition at line 126 of file arithmetic.cpp.
| const char jlm::rvsdg::BitSgeLabel = "BitSge" |
Definition at line 52 of file comparison.cpp.
| const char jlm::rvsdg::BitSgtLabel = "BitSgt" |
Definition at line 64 of file comparison.cpp.
| const char jlm::rvsdg::BitShlLabel = "BitShl" |
Definition at line 138 of file arithmetic.cpp.
| const char jlm::rvsdg::BitShrLabel = "BitShr" |
Definition at line 150 of file arithmetic.cpp.
| const char jlm::rvsdg::BitSleLabel = "BitSle" |
Definition at line 76 of file comparison.cpp.
| const char jlm::rvsdg::BitSltLabel = "BitSlt" |
Definition at line 88 of file comparison.cpp.
| const char jlm::rvsdg::BitSModLabel = "BitSMod" |
Definition at line 162 of file arithmetic.cpp.
| const char jlm::rvsdg::BitSMulHLabel = "BitSMulH" |
Definition at line 174 of file arithmetic.cpp.
| const char jlm::rvsdg::BitSubLabel = "BitSub" |
Definition at line 189 of file arithmetic.cpp.
| const char jlm::rvsdg::BitUDivLabel = "BitUDiv" |
Definition at line 201 of file arithmetic.cpp.
| const char jlm::rvsdg::BitUgeLabel = "BitUge" |
Definition at line 100 of file comparison.cpp.
| const char jlm::rvsdg::BitUgtLabel = "BitUgt" |
Definition at line 112 of file comparison.cpp.
| const char jlm::rvsdg::BitUleLabel = "BitUle" |
Definition at line 124 of file comparison.cpp.
| const char jlm::rvsdg::BitUltLabel = "BitUlt" |
Definition at line 136 of file comparison.cpp.
| const char jlm::rvsdg::BitUModLabel = "BitUMod" |
Definition at line 213 of file arithmetic.cpp.
| const char jlm::rvsdg::BitUMulHLabel = "BitUMulH" |
Definition at line 225 of file arithmetic.cpp.
| const char jlm::rvsdg::BitXorLabel = "BitXor" |
Definition at line 240 of file arithmetic.cpp.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |