6 #ifndef JLM_RVSDG_BITSTRING_ARITHMETIC_HPP
7 #define JLM_RVSDG_BITSTRING_ARITHMETIC_HPP
15 template<
typename reduction, const
char * name>
34 [[nodiscard]] std::unique_ptr<Operation>
35 copy()
const override;
37 std::unique_ptr<BitUnaryOperation>
38 create(
size_t nbits)
const override;
43 return CreateOpNode<MakeBitUnaryOperation>({ op }, nbits).output(0);
47 template<
typename reduction, const
char * name, enum BinaryOperation::flags opflags>
61 flags() const noexcept override;
71 copy() const override;
74 create(
size_t nbits) const override;
79 return CreateOpNode<MakeBitBinaryOperation>({ op1, op2 }, nbits).output(0);
BitBinaryOperation(const std::shared_ptr< const BitType > type, size_t arity=2) noexcept
static std::shared_ptr< const BitType > Create(std::size_t nbits)
Creates bit type of specified width.
BitUnaryOperation(const std::shared_ptr< const BitType > &type) noexcept
MakeBitBinaryOperation(std::size_t nbits) noexcept
std::unique_ptr< Operation > copy() const override
std::string debug_string() const override
bool operator==(const Operation &other) const noexcept override
~MakeBitBinaryOperation() noexcept override
BitValueRepresentation reduce_constants(const BitValueRepresentation &arg1, const BitValueRepresentation &arg2) const override
enum BinaryOperation::flags flags() const noexcept override
std::unique_ptr< BitBinaryOperation > create(size_t nbits) const override
~MakeBitUnaryOperation() noexcept override
MakeBitUnaryOperation(std::size_t nbits) noexcept
BitValueRepresentation reduce_constant(const BitValueRepresentation &arg) const override
std::unique_ptr< BitUnaryOperation > create(size_t nbits) const override
bool operator==(const Operation &other) const noexcept override
std::unique_ptr< Operation > copy() const override
std::string debug_string() const override
static Output * create(size_t nbits, Output *op)
const char BitNegateLabel[]
const char BitSMulHLabel[]
const char BitAShrLabel[]
const char BitSDivLabel[]
const char BitUDivLabel[]
const char BitUModLabel[]
const char BitUMulHLabel[]
const char BitSModLabel[]