7#ifndef JLM_RVSDG_CONTROL_HPP
8#define JLM_RVSDG_CONTROL_HPP
17#include <unordered_map>
58 static std::shared_ptr<const ControlType>
79 return !(*
this ==
other);
136 return create(region, 2, 0);
142 return create(region, 2, 1);
182 return std::static_pointer_cast<const ControlType>(
result(0))->nalternatives();
204 return std::static_pointer_cast<const BitType>(
argument(0))->nbits();
222 const std::unordered_map<uint64_t, uint64_t> &
mapping,
238 const std::unordered_map<uint64_t, uint64_t> &
mapping,
ControlValueRepresentation value_
~ControlConstantOperation() noexcept override
static Output & create(Region ®ion, ControlValueRepresentation value)
static Output & create(Region ®ion, size_t numAlternatives, size_t alternative)
std::string debug_string() const override
std::unique_ptr< Operation > copy() const override
static Output & createFalse(Region ®ion)
const ControlValueRepresentation & value() const noexcept
static Output & createTrue(Region ®ion)
std::string debug_string() const override
std::size_t ComputeHash() const noexcept override
~ControlType() noexcept override
size_t nalternatives() const noexcept
TypeKind Kind() const noexcept override
Return the kind of this type.
static std::shared_ptr< const ControlType > Create(std::size_t nalternatives)
Instantiates control type.
size_t nalternatives() const noexcept
bool operator!=(const ControlValueRepresentation &other) const noexcept
bool operator==(const ControlValueRepresentation &other) const noexcept
size_t alternative() const noexcept
std::unordered_map< uint64_t, uint64_t > mapping_
const_iterator end() const
~MatchOperation() noexcept override
static const BitType & CheckAndExtractBitType(const rvsdg::Type &type)
uint64_t alternative(uint64_t value) const noexcept
uint64_t nalternatives() const noexcept
uint64_t default_alternative_
const_iterator begin() const
size_t nbits() const noexcept
uint64_t default_alternative() const noexcept
static Output * Create(Output &predicate, const std::unordered_map< uint64_t, uint64_t > &mapping, const uint64_t defaultAlternative, const size_t numAlternatives)
std::unique_ptr< Operation > copy() const override
std::unordered_map< uint64_t, uint64_t >::const_iterator const_iterator
std::string debug_string() const override
static Node & CreateNode(Output &predicate, const std::unordered_map< uint64_t, uint64_t > &mapping, const uint64_t defaultAlternative, const size_t numAlternatives)
NodeOutput * output(size_t index) const noexcept
Nullary operator (operator taking no formal arguments)
const std::shared_ptr< const rvsdg::Type > & Type() const noexcept
Represent acyclic RVSDG subgraphs.
const std::shared_ptr< const rvsdg::Type > & argument(size_t index) const noexcept
const std::shared_ptr< const rvsdg::Type > & result(size_t index) const noexcept
virtual std::string debug_string() const =0
TypeKind
The kinds of types supported in rvsdg.
NodeType * TryGetOwnerNode(const rvsdg::Input &input) noexcept
Checks if this is an input to a node of specified type.