6#ifndef JLM_LLVM_IR_OPERATORS_ARITHMETICWITHOVERFLOWINTRINSICOPERATIONS_HPP
7#define JLM_LLVM_IR_OPERATORS_ARITHMETICWITHOVERFLOWINTRINSICOPERATIONS_HPP
37 operator==(
const Operation & other)
const noexcept override;
42 [[nodiscard]] std::unique_ptr<Operation>
43 copy()
const override;
45 [[nodiscard]] std::shared_ptr<const rvsdg::Type>
51 [[nodiscard]] std::shared_ptr<const rvsdg::Type>
57 static std::unique_ptr<ThreeAddressCode>
60 auto operation = std::make_unique<SAddWithOverflowOperation>(operand1.
Type());
68 { &operand1, &operand2 },
97 operator==(
const Operation & other)
const noexcept override;
102 [[nodiscard]] std::unique_ptr<Operation>
103 copy()
const override;
105 [[nodiscard]] std::shared_ptr<const rvsdg::Type>
111 [[nodiscard]] std::shared_ptr<const rvsdg::Type>
117 static std::unique_ptr<ThreeAddressCode>
120 auto operation = std::make_unique<UAddWithOverflowOperation>(operand1.
Type());
128 { &operand1, &operand2 },
157 operator==(
const Operation & other)
const noexcept override;
162 [[nodiscard]] std::unique_ptr<Operation>
163 copy()
const override;
165 [[nodiscard]] std::shared_ptr<const rvsdg::Type>
171 [[nodiscard]] std::shared_ptr<const rvsdg::Type>
177 static std::unique_ptr<ThreeAddressCode>
180 auto operation = std::make_unique<SSubWithOverflowOperation>(operand1.
Type());
188 { &operand1, &operand2 },
217 operator==(
const Operation & other)
const noexcept override;
222 [[nodiscard]] std::unique_ptr<Operation>
223 copy()
const override;
225 [[nodiscard]] std::shared_ptr<const rvsdg::Type>
231 [[nodiscard]] std::shared_ptr<const rvsdg::Type>
237 static std::unique_ptr<ThreeAddressCode>
240 auto operation = std::make_unique<SMulWithOverflowOperation>(operand1.
Type());
248 { &operand1, &operand2 },
277 operator==(
const Operation & other)
const noexcept override;
282 [[nodiscard]] std::unique_ptr<Operation>
283 copy()
const override;
285 [[nodiscard]] std::shared_ptr<const rvsdg::Type>
291 [[nodiscard]] std::shared_ptr<const rvsdg::Type>
297 static std::unique_ptr<ThreeAddressCode>
300 auto operation = std::make_unique<UMulWithOverflowOperation>(operand1.
Type());
308 { &operand1, &operand2 },
static rvsdg::SimpleNode & createNode(rvsdg::Output &operand1, rvsdg::Output &operand2)
static void checkOperandType(const std::shared_ptr< const rvsdg::Type > &type)
std::string debug_string() const override
static std::unique_ptr< ThreeAddressCode > createTac(const Variable &operand1, const Variable &operand2)
~SAddWithOverflowOperation() noexcept override
std::shared_ptr< const rvsdg::Type > getOperandType() const noexcept
std::unique_ptr< Operation > copy() const override
std::shared_ptr< const rvsdg::Type > getResultType() const noexcept
bool operator==(const Operation &other) const noexcept override
std::unique_ptr< Operation > copy() const override
bool operator==(const Operation &other) const noexcept override
static rvsdg::SimpleNode & createNode(rvsdg::Output &operand1, rvsdg::Output &operand2)
std::shared_ptr< const rvsdg::Type > getOperandType() const noexcept
static std::unique_ptr< ThreeAddressCode > createTac(const Variable &operand1, const Variable &operand2)
std::string debug_string() const override
~SMulWithOverflowOperation() noexcept override
std::shared_ptr< const rvsdg::Type > getResultType() const noexcept
static void checkOperandType(const std::shared_ptr< const rvsdg::Type > &type)
std::unique_ptr< Operation > copy() const override
~SSubWithOverflowOperation() noexcept override
static void checkOperandType(const std::shared_ptr< const rvsdg::Type > &type)
std::shared_ptr< const rvsdg::Type > getOperandType() const noexcept
static std::unique_ptr< ThreeAddressCode > createTac(const Variable &operand1, const Variable &operand2)
bool operator==(const Operation &other) const noexcept override
std::shared_ptr< const rvsdg::Type > getResultType() const noexcept
static rvsdg::SimpleNode & createNode(rvsdg::Output &operand1, rvsdg::Output &operand2)
std::string debug_string() const override
static std::shared_ptr< const StructType > CreateLiteral(std::vector< std::shared_ptr< const Type > > types, bool isPacked)
static std::unique_ptr< llvm::ThreeAddressCode > create(std::unique_ptr< rvsdg::SimpleOperation > operation, const std::vector< const Variable * > &operands)
static void checkOperandType(const std::shared_ptr< const rvsdg::Type > &type)
bool operator==(const Operation &other) const noexcept override
std::shared_ptr< const rvsdg::Type > getResultType() const noexcept
std::string debug_string() const override
std::shared_ptr< const rvsdg::Type > getOperandType() const noexcept
~UAddWithOverflowOperation() noexcept override
static std::unique_ptr< ThreeAddressCode > createTac(const Variable &operand1, const Variable &operand2)
std::unique_ptr< Operation > copy() const override
static rvsdg::SimpleNode & createNode(rvsdg::Output &operand1, rvsdg::Output &operand2)
static std::unique_ptr< ThreeAddressCode > createTac(const Variable &operand1, const Variable &operand2)
std::shared_ptr< const rvsdg::Type > getOperandType() const noexcept
std::string debug_string() const override
std::shared_ptr< const rvsdg::Type > getResultType() const noexcept
bool operator==(const Operation &other) const noexcept override
static rvsdg::SimpleNode & createNode(rvsdg::Output &operand1, rvsdg::Output &operand2)
static void checkOperandType(const std::shared_ptr< const rvsdg::Type > &type)
std::unique_ptr< Operation > copy() const override
~UMulWithOverflowOperation() noexcept override
const std::shared_ptr< const jlm::rvsdg::Type > Type() const noexcept
static std::shared_ptr< const BitType > Create(std::size_t nbits)
Creates bit type of specified width.
const std::shared_ptr< const rvsdg::Type > & Type() const noexcept
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
SimpleOperation(std::vector< std::shared_ptr< const jlm::rvsdg::Type > > operands, std::vector< std::shared_ptr< const jlm::rvsdg::Type > > results)
Global memory state passed between functions.
NodeType * TryGetOwnerNode(const rvsdg::Input &input) noexcept
Checks if this is an input to a node of specified type.