6#ifndef JLM_LLVM_IR_OPERATORS_GENERALINTRINSICOPERATIONS_HPP
7#define JLM_LLVM_IR_OPERATORS_GENERALINTRINSICOPERATIONS_HPP
33 operator==(
const Operation & other)
const noexcept override;
38 [[nodiscard]] std::unique_ptr<Operation>
39 copy()
const override;
41 [[nodiscard]] std::shared_ptr<const rvsdg::Type>
47 static std::unique_ptr<ThreeAddressCode>
50 auto operation = std::make_unique<IsConstantOperation>(operand.
Type());
73 const std::shared_ptr<const rvsdg::Type> & ptrOperandType,
74 const std::shared_ptr<const rvsdg::Type> & maskOperandType)
75 :
SimpleOperation({ ptrOperandType, maskOperandType }, { ptrOperandType })
79 operator==(
const Operation & other)
const noexcept override;
84 [[nodiscard]] std::unique_ptr<Operation>
85 copy()
const override;
87 [[nodiscard]] std::shared_ptr<const rvsdg::Type>
93 [[nodiscard]] std::shared_ptr<const rvsdg::Type>
99 static std::unique_ptr<ThreeAddressCode>
102 auto operation = std::make_unique<PtrMaskOperation>(ptrOperand.
Type(), maskOperand.
Type());
110 { &ptrOperand, &maskOperand },
118 const std::shared_ptr<const rvsdg::Type> & ptrType,
119 const std::shared_ptr<const rvsdg::Type> & maskType);
static rvsdg::SimpleNode & createNode(rvsdg::Output &operand)
bool operator==(const Operation &other) const noexcept override
static std::unique_ptr< ThreeAddressCode > createTac(const Variable &operand)
std::unique_ptr< Operation > copy() const override
~IsConstantOperation() noexcept override
std::shared_ptr< const rvsdg::Type > getType() const noexcept
std::string debug_string() const override
std::unique_ptr< Operation > copy() const override
std::shared_ptr< const rvsdg::Type > getPtrOperandType() const noexcept
static void checkOperandTypes(const std::shared_ptr< const rvsdg::Type > &ptrType, const std::shared_ptr< const rvsdg::Type > &maskType)
static std::unique_ptr< ThreeAddressCode > createTac(const Variable &ptrOperand, const Variable &maskOperand)
static rvsdg::SimpleNode & createNode(rvsdg::Output &ptrOperand, rvsdg::Output &maskOperand)
std::string debug_string() const override
bool operator==(const Operation &other) const noexcept override
std::shared_ptr< const rvsdg::Type > getMaskOperandType() const noexcept
~PtrMaskOperation() noexcept override
static std::unique_ptr< llvm::ThreeAddressCode > create(std::unique_ptr< rvsdg::SimpleOperation > operation, const std::vector< const Variable * > &operands)
const std::shared_ptr< const jlm::rvsdg::Type > Type() const noexcept
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)
UnaryOperation(std::shared_ptr< const Type > operand, std::shared_ptr< const Type > result)
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.