27 return type !=
nullptr && this->nbits() ==
type->nbits();
33 auto typeHash =
typeid(
BitType).hash_code();
34 auto numBitsHash = std::hash<size_t>()(
nbits_);
44 std::shared_ptr<const BitType>
47 static const BitType static_instances[65] = {
64 throw util::Error(
"Number of bits must be greater than zero.");
67 return std::shared_ptr<const BitType>(std::shared_ptr<void>(), &static_instances[
nbits]);
71 return std::make_shared<BitType>(
nbits);
bool operator==(const jlm::rvsdg::Type &other) const noexcept override
static std::shared_ptr< const BitType > Create(std::size_t nbits)
Creates bit type of specified width.
TypeKind Kind() const noexcept override
Return the kind of this type.
size_t nbits() const noexcept
std::size_t ComputeHash() const noexcept override
~BitType() noexcept override
constexpr BitType(const size_t nbits)
static std::string type(const Node *n)
TypeKind
The kinds of types supported in rvsdg.
@ Value
Designate a value type.
static std::string strfmt(Args... args)
std::size_t CombineHashes(std::size_t hash, Args... args)