|
Jlm
|
StructType class. More...
#include <types.hpp>


Public Member Functions | |
| ~StructType () noexcept override | |
| StructType (std::string name, std::vector< std::shared_ptr< const Type >> types, const bool isPacked, const bool isLiteral) | |
| StructType (const StructType &)=delete | |
| StructType (StructType &&)=delete | |
| StructType & | operator= (const StructType &)=delete |
| StructType & | operator= (StructType &&)=delete |
| bool | operator== (const Type &other) const noexcept override |
| std::size_t | ComputeHash () const noexcept override |
| rvsdg::TypeKind | Kind () const noexcept override |
| Return the kind of this type. More... | |
| size_t | numElements () const noexcept |
| std::shared_ptr< const Type > | getElementType (const size_t index) const noexcept |
| std::string | debug_string () const override |
| bool | HasName () const noexcept |
| const std::string & | GetName () const noexcept |
| bool | IsPacked () const noexcept |
| bool | IsLiteral () const noexcept |
| size_t | GetFieldOffset (size_t fieldIndex) const |
Public Member Functions inherited from jlm::rvsdg::Type | |
| virtual | ~Type () noexcept |
| virtual bool | operator== (const jlm::rvsdg::Type &other) const noexcept=0 |
| bool | operator!= (const jlm::rvsdg::Type &other) const noexcept |
Static Public Member Functions | |
| static std::shared_ptr< const StructType > | CreateIdentified (const std::string &name, std::vector< std::shared_ptr< const Type >> types, bool isPacked) |
| static std::shared_ptr< const StructType > | CreateIdentified (std::vector< std::shared_ptr< const Type >> types, bool isPacked) |
| static std::shared_ptr< const StructType > | CreateLiteral (std::vector< std::shared_ptr< const Type >> types, bool isPacked) |
Private Attributes | |
| std::string | name_ |
| std::vector< std::shared_ptr< const Type > > | types_ {} |
| bool | isPacked_ |
| bool | isLiteral_ |
Additional Inherited Members | |
Protected Member Functions inherited from jlm::rvsdg::Type | |
| constexpr | Type () noexcept |
StructType class.
This class is the equivalent of LLVM's StructType class. There are two different kinds of struct types: Literal structs and Identified structs. Literal struct types (e.g., { i32, i32 }) are uniqued structurally. Identified structs (e.g., foo or %42) may optionally have a name and are not uniqued.
|
overridedefaultnoexcept |
|
inline |
|
delete |
|
delete |
|
overridevirtualnoexcept |
Computes a hash value for the instance of the type.
Implements jlm::rvsdg::Type.
|
inlinestatic |
Creates an identified struct, with a name. The name should be unique to this struct.
| name | the name of the struct, or an empty string if the struct is unnamed. |
| types | the fields in the struct |
| isPacked | true if the struct is packed (no padding or alignment), false otherwise |
|
inlinestatic |
|
inlinestatic |
|
overridevirtual |
Implements jlm::rvsdg::Type.
|
inlinenoexcept |
| size_t jlm::llvm::StructType::GetFieldOffset | ( | size_t | fieldIndex | ) | const |
Gets the position of the given field, as a byte offset from the start of the struct. Non-packed structs use padding to respect the alignment of each field, just like in C. Packed structs have no padding, and no alignment.
| fieldIndex | the index of the field, must be valid |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
overridevirtualnoexcept |
Return the kind of this type.
Implements jlm::rvsdg::Type.
|
inlinenoexcept |
|
delete |
|
delete |
|
overridenoexcept |
|
private |