18 std::vector<std::shared_ptr<const jlm::rvsdg::BitType>>
types;
20 types.push_back(std::dynamic_pointer_cast<const jlm::rvsdg::BitType>(operand->Type()));
25std::shared_ptr<const BitType>
27 const std::vector<std::shared_ptr<const BitType>> &
types)
noexcept
30 for (
const auto &
t :
types)
43 if (!
op ||
op->narguments() != narguments())
46 for (
size_t n = 0;
n < narguments();
n++)
48 if (
op->argument(
n) != argument(
n))
136std::unique_ptr<Operation>
139 return std::make_unique<BitConcatOperation>(*
this);
142static std::vector<std::shared_ptr<const BitType>>
145 std::vector<std::shared_ptr<const BitType>>
types;
146 for (
const auto arg :
args)
148 types.push_back(std::dynamic_pointer_cast<const BitType>(arg->Type()));
153std::optional<std::vector<rvsdg::Output *>>
std::string debug_string() const override
enum BinaryOperation::flags flags() const noexcept override
binop_reduction_path_t can_reduce_operand_pair(const jlm::rvsdg::Output *arg1, const jlm::rvsdg::Output *arg2) const noexcept override
std::unique_ptr< Operation > copy() const override
static std::shared_ptr< const BitType > aggregate_arguments(const std::vector< std::shared_ptr< const BitType > > &types) noexcept
jlm::rvsdg::Output * reduce_operand_pair(binop_reduction_path_t path, jlm::rvsdg::Output *arg1, jlm::rvsdg::Output *arg2) const override
~BitConcatOperation() noexcept override
static Output & create(Region ®ion, BitValueRepresentation value)
static std::shared_ptr< const BitType > Create(std::size_t nbits)
Creates bit type of specified width.
std::vector< jlm::rvsdg::Output * > associative_flatten(std::vector< jlm::rvsdg::Output * > args, const FlattenTester &flatten_tester)
static const binop_reduction_path_t binop_reduction_constants
static std::vector< std::shared_ptr< const BitType > > GetTypesFromOperands(const std::vector< rvsdg::Output * > &args)
static std::vector< jlm::rvsdg::Output * > operands(const Node *node)
static std::vector< jlm::rvsdg::Output * > outputs(const Node *node)
size_t binop_reduction_path_t
std::optional< std::vector< rvsdg::Output * > > FlattenBitConcatOperation(const BitConcatOperation &, const std::vector< rvsdg::Output * > &operands)
jlm::rvsdg::Output * bitconcat(const std::vector< jlm::rvsdg::Output * > &operands)
NodeType * TryGetOwnerNode(const rvsdg::Input &input) noexcept
Checks if this is an input to a node of specified type.
static const binop_reduction_path_t binop_reduction_none
jlm::rvsdg::Output * bitslice(jlm::rvsdg::Output *argument, size_t low, size_t high)
Create bitslice.
static const binop_reduction_path_t binop_reduction_merge