17 return operation && *operation->
getType() == *getType();
26std::unique_ptr<rvsdg::Operation>
29 return std::make_unique<IsConstantOperation>(*
this);
39 && *operation->getMaskOperandType() == *getMaskOperandType();
48std::unique_ptr<rvsdg::Operation>
51 return std::make_unique<PtrMaskOperation>(*
this);
56 const std::shared_ptr<const rvsdg::Type> & ptrType,
57 const std::shared_ptr<const rvsdg::Type> & maskType)
59 if (is<PointerType>(ptrType))
61 if (is<rvsdg::BitType>(maskType))
64 throw std::runtime_error(
65 "PtrMaskOperation::checkOperandTypes: Expected mask type to be integer.");
68 if (
const auto vectorType = std::dynamic_pointer_cast<const VectorType>(ptrType))
70 if (isVectorOfSize<const rvsdg::BitType>(*vectorType, vectorType->size()))
74 "PtrMaskOperation::checkOperandTypes: Expected mask type to be a "
75 "vector of integers of size ",
80 throw std::runtime_error(
81 "PtrMaskOperation::checkOperandTypes: Expected pointer or vector of pointer types.");
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)
std::string debug_string() const override
std::shared_ptr< const rvsdg::Type > getMaskOperandType() const noexcept
~PtrMaskOperation() noexcept override
Global memory state passed between functions.
static std::string strfmt(Args... args)