Jlm
Loading...
Searching...
No Matches
type.hpp
Go to the documentation of this file.
1/*
2 * Copyright 2011 2012 2013 2014 2015 Nico Reißmann <nico.reissmann@gmail.com>
3 * Copyright 2014 Helge Bahmann <hcb@chaoticmind.net>
4 * See COPYING for terms of redistribution.
5 */
6
7#ifndef JLM_RVSDG_BITSTRING_TYPE_HPP
8#define JLM_RVSDG_BITSTRING_TYPE_HPP
9
10#include <jlm/rvsdg/type.hpp>
11#include <jlm/util/common.hpp>
12
13namespace jlm::rvsdg
14{
15
16class BitType final : public Type
17{
18public:
20
24
25 inline size_t
27 {
28 return nbits_;
29 }
30
31 [[nodiscard]] std::string
32 debug_string() const override;
33
34 bool
35 operator==(const jlm::rvsdg::Type & other) const noexcept override;
36
37 [[nodiscard]] std::size_t
39
42
57 Create(std::size_t nbits);
58
60 size_t nbits_;
61};
62
63}
64
65#endif
bool operator==(const jlm::rvsdg::Type &other) const noexcept override
Definition type.cpp:24
static std::shared_ptr< const BitType > Create(std::size_t nbits)
Creates bit type of specified width.
Definition type.cpp:45
TypeKind Kind() const noexcept override
Return the kind of this type.
Definition type.cpp:39
size_t nbits() const noexcept
Definition type.hpp:26
std::size_t ComputeHash() const noexcept override
Definition type.cpp:31
~BitType() noexcept override
std::string debug_string() const override
Definition type.cpp:18
TypeKind
The kinds of types supported in rvsdg.
Definition type.hpp:22
NodeType * TryGetOwnerNode(const rvsdg::Input &input) noexcept
Checks if this is an input to a node of specified type.
Definition node.hpp:872