6#ifndef JLM_LLVM_IR_OPERATORS_CONVERSIONOPERATIONS_HPP
7#define JLM_LLVM_IR_OPERATORS_CONVERSIONOPERATIONS_HPP
24 std::shared_ptr<const
jlm::rvsdg::Type> srctype,
25 std::shared_ptr<const
jlm::rvsdg::Type> dsttype)
42 operator==(
const Operation & other)
const noexcept override;
44 [[nodiscard]] std::string
47 [[nodiscard]] std::unique_ptr<Operation>
48 copy()
const override;
50 static std::unique_ptr<llvm::ThreeAddressCode>
55 auto op = std::make_unique<BitCastOperation>(pair.first, pair.second);
67 static std::pair<std::shared_ptr<const jlm::rvsdg::Type>, std::shared_ptr<const jlm::rvsdg::Type>>
69 const std::shared_ptr<const jlm::rvsdg::Type> & otype,
70 const std::shared_ptr<const jlm::rvsdg::Type> & rtype)
78 return std::make_pair(otype, rtype);
88 std::shared_ptr<const rvsdg::Type> srctype,
89 std::shared_ptr<const rvsdg::Type> dsttype)
92 auto ot = std::dynamic_pointer_cast<const rvsdg::BitType>(srctype);
96 auto rt = std::dynamic_pointer_cast<const rvsdg::BitType>(dsttype);
100 if (ot->nbits() >= rt->nbits())
101 throw util::Error(
"expected operand's #bits to be smaller than results' #bits.");
105 operator==(
const Operation & other)
const noexcept override;
107 [[nodiscard]] std::string
110 [[nodiscard]] std::unique_ptr<Operation>
111 copy()
const override;
116 return std::static_pointer_cast<const rvsdg::BitType>(
argument(0))->nbits();
122 return std::static_pointer_cast<const rvsdg::BitType>(
result(0))->nbits();
125 static std::unique_ptr<llvm::ThreeAddressCode>
128 auto operation = std::make_unique<SExtOperation>(operand->
Type(), std::move(type));
157 static std::optional<std::vector<rvsdg::Output *>>
167 std::shared_ptr<const
jlm::rvsdg::Type> srctype,
168 std::shared_ptr<const
jlm::rvsdg::Type> dsttype)
179 if (dt->nbits() < st->nbits())
180 throw util::Error(
"# destination bits must be greater than # source bits.");
184 operator==(
const Operation & other)
const noexcept override;
186 [[nodiscard]] std::string
189 [[nodiscard]] std::unique_ptr<Operation>
190 copy()
const override;
195 return std::static_pointer_cast<const rvsdg::BitType>(
argument(0))->nbits();
201 return std::static_pointer_cast<const rvsdg::BitType>(
result(0))->nbits();
204 static std::unique_ptr<llvm::ThreeAddressCode>
207 auto operation = std::make_unique<ZExtOperation>(operand->
Type(), std::move(type));
236 static std::optional<std::vector<rvsdg::Output *>>
246 const std::shared_ptr<const rvsdg::BitType> & operandType,
247 const std::shared_ptr<const rvsdg::BitType> & resultType)
250 if (operandType->nbits() < resultType->nbits())
251 throw util::Error(
"expected operand's #bits to be larger than results' #bits.");
255 std::shared_ptr<const rvsdg::Type> operandType,
256 std::shared_ptr<const rvsdg::Type> resultType)
261 operator==(
const Operation & other)
const noexcept override;
263 [[nodiscard]] std::string
266 [[nodiscard]] std::unique_ptr<Operation>
267 copy()
const override;
272 return std::static_pointer_cast<const rvsdg::BitType>(
argument(0))->nbits();
278 return std::static_pointer_cast<const rvsdg::BitType>(
result(0))->nbits();
281 static std::unique_ptr<ThreeAddressCode>
284 auto truncOperation = std::make_unique<TruncOperation>(operand->
Type(), resultType);
310 static std::optional<std::vector<rvsdg::Output *>>
314 static std::shared_ptr<const rvsdg::BitType>
317 if (
auto bitType = std::dynamic_pointer_cast<const rvsdg::BitType>(type))
322 throw std::logic_error(
"expected bits type.");
333 std::shared_ptr<const
jlm::rvsdg::BitType> btype)
338 std::shared_ptr<const jlm::rvsdg::Type> srctype,
339 std::shared_ptr<const jlm::rvsdg::Type> dsttype)
342 auto pt =
dynamic_cast<const PointerType *
>(srctype.get());
352 operator==(
const Operation & other)
const noexcept override;
354 [[nodiscard]] std::string
357 [[nodiscard]] std::unique_ptr<Operation>
358 copy()
const override;
363 return std::static_pointer_cast<const rvsdg::BitType>(
result(0))->nbits();
366 static std::unique_ptr<llvm::ThreeAddressCode>
369 auto pt = std::dynamic_pointer_cast<const PointerType>(
argument->Type());
373 auto bt = std::dynamic_pointer_cast<const jlm::rvsdg::BitType>(type);
377 auto op = std::make_unique<PtrToIntOperation>(std::move(pt), std::move(bt));
391 throw util::Error(
"destination type size must be bigger than source type size.");
395 const std::shared_ptr<const FloatingPointType> & srctype,
396 const std::shared_ptr<const FloatingPointType> & dsttype)
400 throw util::Error(
"destination type size must be bigger than source type size.");
404 std::shared_ptr<const jlm::rvsdg::Type> srctype,
405 std::shared_ptr<const jlm::rvsdg::Type> dsttype)
410 throw util::Error(
"expected floating point type.");
414 throw util::Error(
"expected floating point type.");
417 throw util::Error(
"destination type size must be bigger than source type size.");
421 operator==(
const Operation & other)
const noexcept override;
423 [[nodiscard]] std::string
426 [[nodiscard]] std::unique_ptr<Operation>
427 copy()
const override;
432 return std::static_pointer_cast<const FloatingPointType>(
argument(0))->size();
438 return std::static_pointer_cast<const FloatingPointType>(
result(0))->size();
441 static std::unique_ptr<llvm::ThreeAddressCode>
442 create(
const Variable * operand,
const std::shared_ptr<const jlm::rvsdg::Type> & type)
444 auto st = std::dynamic_pointer_cast<const FloatingPointType>(operand->
Type());
446 throw util::Error(
"expected floating point type.");
448 auto dt = std::dynamic_pointer_cast<const FloatingPointType>(type);
450 throw util::Error(
"expected floating point type.");
452 auto op = std::make_unique<FPExtOperation>(std::move(st), std::move(dt));
467 throw util::Error(
"destination tpye size must be smaller than source size type.");
471 const std::shared_ptr<const FloatingPointType> & srctype,
472 const std::shared_ptr<const FloatingPointType> & dsttype)
476 throw util::Error(
"destination type size must be bigger than source type size.");
480 std::shared_ptr<const jlm::rvsdg::Type> srctype,
481 std::shared_ptr<const jlm::rvsdg::Type> dsttype)
486 throw util::Error(
"expected floating point type.");
490 throw util::Error(
"expected floating point type.");
494 throw util::Error(
"destination type size must be smaller than source size type.");
498 operator==(
const Operation & other)
const noexcept override;
500 [[nodiscard]] std::string
503 [[nodiscard]] std::unique_ptr<Operation>
504 copy()
const override;
509 return std::static_pointer_cast<const FloatingPointType>(
argument(0))->size();
515 return std::static_pointer_cast<const FloatingPointType>(
result(0))->size();
518 static std::unique_ptr<llvm::ThreeAddressCode>
521 auto st = std::dynamic_pointer_cast<const FloatingPointType>(operand->
Type());
523 throw util::Error(
"expected floating point type.");
525 auto dt = std::dynamic_pointer_cast<const FloatingPointType>(type);
527 throw util::Error(
"expected floating point type.");
529 auto op = std::make_unique<FPTruncOperation>(std::move(st), std::move(dt));
540 std::shared_ptr<const
jlm::rvsdg::BitType> srctype,
546 std::shared_ptr<const jlm::rvsdg::Type> optype,
547 std::shared_ptr<const jlm::rvsdg::Type> restype)
556 throw util::Error(
"expected floating point type.");
560 operator==(
const Operation & other)
const noexcept override;
562 [[nodiscard]] std::string
565 [[nodiscard]] std::unique_ptr<Operation>
566 copy()
const override;
568 static std::unique_ptr<llvm::ThreeAddressCode>
569 create(
const Variable * operand,
const std::shared_ptr<const jlm::rvsdg::Type> & type)
571 auto st = std::dynamic_pointer_cast<const jlm::rvsdg::BitType>(operand->
Type());
575 auto rt = std::dynamic_pointer_cast<const FloatingPointType>(type);
577 throw util::Error(
"expected floating point type.");
579 auto op = std::make_unique<UIToFPOperation>(std::move(st), std::move(rt));
590 std::shared_ptr<const
jlm::rvsdg::BitType> srctype,
596 std::shared_ptr<const jlm::rvsdg::Type> srctype,
597 std::shared_ptr<const jlm::rvsdg::Type> dsttype)
606 throw util::Error(
"expected floating point type.");
610 operator==(
const Operation & other)
const noexcept override;
612 [[nodiscard]] std::string
615 [[nodiscard]] std::unique_ptr<Operation>
616 copy()
const override;
618 static std::unique_ptr<llvm::ThreeAddressCode>
619 create(
const Variable * operand,
const std::shared_ptr<const jlm::rvsdg::Type> & type)
621 auto st = std::dynamic_pointer_cast<const jlm::rvsdg::BitType>(operand->
Type());
625 auto rt = std::dynamic_pointer_cast<const FloatingPointType>(type);
627 throw util::Error(
"expected floating point type.");
629 auto op = std::make_unique<SIToFPOperation>(std::move(st), std::move(rt));
642 std::shared_ptr<const rvsdg::BitType> operandType,
650 const std::shared_ptr<const rvsdg::Type> & operandType,
651 const std::shared_ptr<const rvsdg::Type> &)
658 operator==(
const Operation & other)
const noexcept override;
660 [[nodiscard]] std::string
663 [[nodiscard]] std::unique_ptr<Operation>
664 copy()
const override;
669 return std::static_pointer_cast<const rvsdg::BitType>(
argument(0))->nbits();
672 static std::unique_ptr<ThreeAddressCode>
689 static std::shared_ptr<const rvsdg::BitType>
692 if (
auto bitType = std::dynamic_pointer_cast<const rvsdg::BitType>(operandType))
697 throw std::logic_error(
"expected bitstring type.");
711 std::shared_ptr<const FloatingPointType> operandType,
712 std::shared_ptr<const rvsdg::BitType> resultType)
717 const std::shared_ptr<const rvsdg::Type> & operandType,
718 const std::shared_ptr<const rvsdg::Type> & resultType)
726 operator==(
const Operation & other)
const noexcept override;
728 [[nodiscard]] std::string
731 [[nodiscard]] std::unique_ptr<Operation>
732 copy()
const override;
734 static std::unique_ptr<ThreeAddressCode>
735 create(
const Variable * operand,
const std::shared_ptr<const rvsdg::Type> & type)
739 auto operation = std::make_unique<FPToUIOperation>(std::move(operandType), std::move(bitType));
744 static std::shared_ptr<const FloatingPointType>
747 if (
auto fpType = std::dynamic_pointer_cast<const FloatingPointType>(operandType))
752 throw std::logic_error(
"Expected floating point type.");
755 static std::shared_ptr<const rvsdg::BitType>
758 if (
auto bitType = std::dynamic_pointer_cast<const rvsdg::BitType>(resultType))
763 throw std::logic_error(
"Expected bitstring type.");
777 std::shared_ptr<const FloatingPointType> operandType,
778 std::shared_ptr<const rvsdg::BitType> resultType)
783 const std::shared_ptr<const rvsdg::Type> & operandType,
784 const std::shared_ptr<const rvsdg::Type> & resultType)
792 operator==(
const Operation & other)
const noexcept override;
794 [[nodiscard]] std::string
797 [[nodiscard]] std::unique_ptr<Operation>
798 copy()
const override;
800 static std::unique_ptr<ThreeAddressCode>
801 create(
const Variable * operand,
const std::shared_ptr<const rvsdg::Type> & type)
805 auto op = std::make_unique<FPToSIOperation>(std::move(operandType), std::move(bitType));
810 static std::shared_ptr<const FloatingPointType>
813 if (
auto fpType = std::dynamic_pointer_cast<const FloatingPointType>(operandType))
818 throw std::logic_error(
"Expected floating point type.");
821 static std::shared_ptr<const rvsdg::BitType>
824 if (
auto bitType = std::dynamic_pointer_cast<const rvsdg::BitType>(resultType))
829 throw std::logic_error(
"Expected bitstring type.");
839 std::shared_ptr<const rvsdg::ControlType> srctype,
840 std::shared_ptr<const
jlm::rvsdg::BitType> dsttype)
845 operator==(
const Operation & other)
const noexcept override;
847 [[nodiscard]] std::string
850 [[nodiscard]] std::unique_ptr<Operation>
851 copy()
const override;
853 static std::unique_ptr<llvm::ThreeAddressCode>
854 create(
const Variable * operand,
const std::shared_ptr<const jlm::rvsdg::Type> & type)
856 auto st = std::dynamic_pointer_cast<const rvsdg::ControlType>(operand->
Type());
860 auto dt = std::dynamic_pointer_cast<const jlm::rvsdg::BitType>(type);
864 auto op = std::make_unique<ControlToIntOperation>(std::move(st), std::move(dt));
880 operator==(
const Operation & other)
const noexcept override;
882 [[nodiscard]] std::string
885 [[nodiscard]] std::unique_ptr<Operation>
886 copy()
const override;
888 static std::unique_ptr<FunctionToPointerOperation>
889 Create(std::shared_ptr<const rvsdg::FunctionType> fn);
891 const std::shared_ptr<const rvsdg::FunctionType> &
900 const auto functionType = std::dynamic_pointer_cast<const rvsdg::FunctionType>(operand.
Type());
903 throw std::logic_error(
"Expect function type.");
924 static std::optional<std::vector<rvsdg::Output *>>
927 const std::vector<rvsdg::Output *> & operands);
944 operator==(
const Operation & other)
const noexcept override;
946 [[nodiscard]] std::string
949 [[nodiscard]] std::unique_ptr<Operation>
950 copy()
const override;
952 static std::unique_ptr<PointerToFunctionOperation>
953 Create(std::shared_ptr<const rvsdg::FunctionType> fn);
955 const std::shared_ptr<const rvsdg::FunctionType> &
976 static std::optional<std::vector<rvsdg::Output *>>
979 const std::vector<rvsdg::Output *> & operands);
bool operator==(const Operation &other) const noexcept override
std::string debug_string() const override
BitCastOperation(const BitCastOperation &)=default
BitCastOperation(Operation &&)=delete
static std::unique_ptr< llvm::ThreeAddressCode > createTac(const Variable *operand, std::shared_ptr< const jlm::rvsdg::Type > type)
std::unique_ptr< Operation > copy() const override
static jlm::rvsdg::Output * create(jlm::rvsdg::Output *operand, std::shared_ptr< const jlm::rvsdg::Type > rtype)
BitCastOperation & operator=(const Operation &)=delete
~BitCastOperation() noexcept override
static std::pair< std::shared_ptr< const jlm::rvsdg::Type >, std::shared_ptr< const jlm::rvsdg::Type > > check_types(const std::shared_ptr< const jlm::rvsdg::Type > &otype, const std::shared_ptr< const jlm::rvsdg::Type > &rtype)
BitCastOperation & operator=(Operation &&)=delete
static std::unique_ptr< llvm::ThreeAddressCode > create(const Variable *operand, const std::shared_ptr< const jlm::rvsdg::Type > &type)
bool operator==(const Operation &other) const noexcept override
std::string debug_string() const override
~ControlToIntOperation() noexcept override
std::unique_ptr< Operation > copy() const override
FPExtOperation(std::shared_ptr< const jlm::rvsdg::Type > srctype, std::shared_ptr< const jlm::rvsdg::Type > dsttype)
const fpsize & srcsize() const noexcept
~FPExtOperation() noexcept override
std::string debug_string() const override
static std::unique_ptr< llvm::ThreeAddressCode > create(const Variable *operand, const std::shared_ptr< const jlm::rvsdg::Type > &type)
bool operator==(const Operation &other) const noexcept override
std::unique_ptr< Operation > copy() const override
FPExtOperation(const std::shared_ptr< const FloatingPointType > &srctype, const std::shared_ptr< const FloatingPointType > &dsttype)
const fpsize & dstsize() const noexcept
~FPToSIOperation() noexcept override
std::unique_ptr< Operation > copy() const override
FPToSIOperation(const std::shared_ptr< const rvsdg::Type > &operandType, const std::shared_ptr< const rvsdg::Type > &resultType)
static std::unique_ptr< ThreeAddressCode > create(const Variable *operand, const std::shared_ptr< const rvsdg::Type > &type)
static std::shared_ptr< const FloatingPointType > checkAndExtractOperandType(const std::shared_ptr< const rvsdg::Type > &operandType)
static std::shared_ptr< const rvsdg::BitType > checkAndExtractResultType(const std::shared_ptr< const rvsdg::Type > &resultType)
bool operator==(const Operation &other) const noexcept override
FPToSIOperation(std::shared_ptr< const FloatingPointType > operandType, std::shared_ptr< const rvsdg::BitType > resultType)
std::string debug_string() const override
static std::shared_ptr< const rvsdg::BitType > checkAndExtractResultType(const std::shared_ptr< const rvsdg::Type > &resultType)
static std::shared_ptr< const FloatingPointType > checkAndExtractOperandType(const std::shared_ptr< const rvsdg::Type > &operandType)
~FPToUIOperation() noexcept override
static std::unique_ptr< ThreeAddressCode > create(const Variable *operand, const std::shared_ptr< const rvsdg::Type > &type)
bool operator==(const Operation &other) const noexcept override
std::unique_ptr< Operation > copy() const override
std::string debug_string() const override
FPToUIOperation(std::shared_ptr< const FloatingPointType > operandType, std::shared_ptr< const rvsdg::BitType > resultType)
FPToUIOperation(const std::shared_ptr< const rvsdg::Type > &operandType, const std::shared_ptr< const rvsdg::Type > &resultType)
bool operator==(const Operation &other) const noexcept override
FPTruncOperation(const std::shared_ptr< const FloatingPointType > &srctype, const std::shared_ptr< const FloatingPointType > &dsttype)
const fpsize & dstsize() const noexcept
static std::unique_ptr< llvm::ThreeAddressCode > create(const Variable *operand, std::shared_ptr< const jlm::rvsdg::Type > type)
const fpsize & srcsize() const noexcept
std::unique_ptr< Operation > copy() const override
std::string debug_string() const override
~FPTruncOperation() noexcept override
FPTruncOperation(std::shared_ptr< const jlm::rvsdg::Type > srctype, std::shared_ptr< const jlm::rvsdg::Type > dsttype)
Get address of compiled function object.
std::unique_ptr< Operation > copy() const override
static rvsdg::SimpleNode & createNode(rvsdg::Output &operand)
static std::optional< std::vector< rvsdg::Output * > > invertFunctionToPointer(const FunctionToPointerOperation &operation, const std::vector< rvsdg::Output * > &operands)
std::string debug_string() const override
bool operator==(const Operation &other) const noexcept override
std::shared_ptr< const rvsdg::FunctionType > FunctionType_
static std::unique_ptr< FunctionToPointerOperation > Create(std::shared_ptr< const rvsdg::FunctionType > fn)
~FunctionToPointerOperation() noexcept override
const std::shared_ptr< const rvsdg::FunctionType > & FunctionType() const noexcept
static std::unique_ptr< ThreeAddressCode > create(const Variable *argument)
bool operator==(const Operation &other) const noexcept override
static std::shared_ptr< const rvsdg::BitType > checkAndExtractOperandType(const std::shared_ptr< const rvsdg::Type > &operandType)
std::string debug_string() const override
~IntToPtrOperation() noexcept override
std::unique_ptr< Operation > copy() const override
static rvsdg::Output * create(rvsdg::Output *operand)
size_t nbits() const noexcept
IntToPtrOperation(const std::shared_ptr< const rvsdg::Type > &operandType, const std::shared_ptr< const rvsdg::Type > &)
Interpret pointer as callable function.
static std::optional< std::vector< rvsdg::Output * > > invertPointerToFunction(const PointerToFunctionOperation &operation, const std::vector< rvsdg::Output * > &operands)
std::string debug_string() const override
std::unique_ptr< Operation > copy() const override
bool operator==(const Operation &other) const noexcept override
~PointerToFunctionOperation() noexcept override
const std::shared_ptr< const rvsdg::FunctionType > & FunctionType() const noexcept
static std::unique_ptr< PointerToFunctionOperation > Create(std::shared_ptr< const rvsdg::FunctionType > fn)
std::shared_ptr< const rvsdg::FunctionType > FunctionType_
static std::shared_ptr< const PointerType > Create()
std::unique_ptr< Operation > copy() const override
PtrToIntOperation(std::shared_ptr< const jlm::rvsdg::Type > srctype, std::shared_ptr< const jlm::rvsdg::Type > dsttype)
std::string debug_string() const override
static std::unique_ptr< llvm::ThreeAddressCode > create(const Variable *argument, const std::shared_ptr< const jlm::rvsdg::Type > &type)
bool operator==(const Operation &other) const noexcept override
~PtrToIntOperation() noexcept override
size_t nbits() const noexcept
static std::optional< std::vector< rvsdg::Output * > > foldConstant(const SExtOperation &operation, const std::vector< rvsdg::Output * > &operands)
static std::unique_ptr< llvm::ThreeAddressCode > createTac(const Variable *operand, const std::shared_ptr< const rvsdg::Type > &type)
~SExtOperation() noexcept override
static rvsdg::Output & create(size_t ndstbits, rvsdg::Output &operand)
static rvsdg::SimpleNode & createNode(const size_t numResultBits, rvsdg::Output &operand)
std::string debug_string() const override
std::unique_ptr< Operation > copy() const override
size_t nsrcbits() const noexcept
size_t ndstbits() const noexcept
bool operator==(const Operation &other) const noexcept override
~SIToFPOperation() noexcept override
std::unique_ptr< Operation > copy() const override
bool operator==(const Operation &other) const noexcept override
std::string debug_string() const override
static std::unique_ptr< llvm::ThreeAddressCode > create(const Variable *operand, const std::shared_ptr< const jlm::rvsdg::Type > &type)
SIToFPOperation(std::shared_ptr< const jlm::rvsdg::Type > srctype, std::shared_ptr< const jlm::rvsdg::Type > dsttype)
static std::unique_ptr< llvm::ThreeAddressCode > create(std::unique_ptr< rvsdg::SimpleOperation > operation, const std::vector< const Variable * > &operands)
std::string debug_string() const override
static rvsdg::SimpleNode & createNode(rvsdg::Output &operand, std::shared_ptr< const rvsdg::Type > resultType)
~TruncOperation() noexcept override
static std::shared_ptr< const rvsdg::BitType > checkBitType(const std::shared_ptr< const rvsdg::Type > &type)
bool operator==(const Operation &other) const noexcept override
TruncOperation(std::shared_ptr< const rvsdg::Type > operandType, std::shared_ptr< const rvsdg::Type > resultType)
size_t ndstbits() const noexcept
static std::optional< std::vector< rvsdg::Output * > > foldConstant(const TruncOperation &operation, const std::vector< rvsdg::Output * > &operands)
static rvsdg::Output & create(size_t ndstbits, rvsdg::Output &operand)
static std::unique_ptr< ThreeAddressCode > createTac(const Variable *operand, const std::shared_ptr< const rvsdg::Type > &resultType)
size_t nsrcbits() const noexcept
std::unique_ptr< Operation > copy() const override
bool operator==(const Operation &other) const noexcept override
std::string debug_string() const override
static std::unique_ptr< llvm::ThreeAddressCode > create(const Variable *operand, const std::shared_ptr< const jlm::rvsdg::Type > &type)
UIToFPOperation(std::shared_ptr< const jlm::rvsdg::Type > optype, std::shared_ptr< const jlm::rvsdg::Type > restype)
std::unique_ptr< Operation > copy() const override
~UIToFPOperation() noexcept override
const std::shared_ptr< const jlm::rvsdg::Type > Type() const noexcept
std::string debug_string() const override
size_t nsrcbits() const noexcept
static std::optional< std::vector< rvsdg::Output * > > foldConstant(const ZExtOperation &operation, const std::vector< rvsdg::Output * > &operands)
bool operator==(const Operation &other) const noexcept override
~ZExtOperation() noexcept override
static rvsdg::SimpleNode & createNode(const size_t numResultBits, rvsdg::Output &operand)
static rvsdg::Output & create(size_t ndstbits, rvsdg::Output &operand)
static std::unique_ptr< llvm::ThreeAddressCode > createTac(const Variable *operand, const std::shared_ptr< const jlm::rvsdg::Type > &type)
std::unique_ptr< Operation > copy() const override
size_t ndstbits() 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
NodeOutput * output(size_t index) 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.
@ Value
Designate a value type.
NodeType * TryGetOwnerNode(const rvsdg::Input &input) noexcept
Checks if this is an input to a node of specified type.