#include "mlir/Interfaces/DataLayoutInterfaces.h"
#include "mlir/Dialect/DLTI/DLTI.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/BuiltinOps.h"
#include "mlir/IR/Dialect.h"
#include "mlir/IR/DialectImplementation.h"
#include "mlir/IR/OpDefinition.h"
#include "mlir/IR/OpImplementation.h"
#include "mlir/Parser/Parser.h"
#include <gtest/gtest.h>
usingnamespacemlir;
namespace {
constexpr static llvm::StringLiteral kAttrName = …;
constexpr static llvm::StringLiteral kEndiannesKeyName = …;
constexpr static llvm::StringLiteral kAllocaKeyName = …;
constexpr static llvm::StringLiteral kProgramKeyName = …;
constexpr static llvm::StringLiteral kGlobalKeyName = …;
constexpr static llvm::StringLiteral kStackAlignmentKeyName = …;
constexpr static llvm::StringLiteral kTargetSystemDescAttrName = …;
class DataLayoutSpecStorage : public AttributeStorage { … };
struct CustomDataLayoutSpec
: public Attribute::AttrBase<
CustomDataLayoutSpec, Attribute, DataLayoutSpecStorage,
DLTIQueryInterface::Trait, DataLayoutSpecInterface::Trait> { … };
class TargetSystemSpecStorage : public AttributeStorage { … };
struct CustomTargetSystemSpec
: public Attribute::AttrBase<
CustomTargetSystemSpec, Attribute, TargetSystemSpecStorage,
DLTIQueryInterface::Trait, TargetSystemSpecInterface::Trait> { … };
struct SingleQueryType
: public Type::TypeBase<SingleQueryType, Type, TypeStorage,
DataLayoutTypeInterface::Trait> { … };
struct TypeNoLayout : public Type::TypeBase<TypeNoLayout, Type, TypeStorage> { … };
struct OpWithLayout : public Op<OpWithLayout, DataLayoutOpInterface::Trait> { … };
struct OpWith7BitByte
: public Op<OpWith7BitByte, DataLayoutOpInterface::Trait> { … };
struct DLTestDialect : Dialect { … };
struct DLTargetSystemDescTestDialect : public Dialect { … };
}
TEST(DataLayout, FallbackDefault) { … }
TEST(DataLayout, NullSpec) { … }
TEST(DataLayout, EmptySpec) { … }
TEST(DataLayout, SpecWithEntries) { … }
TEST(DataLayout, SpecWithTargetSystemDescEntries) { … }
TEST(DataLayout, Caching) { … }
TEST(DataLayout, CacheInvalidation) { … }
TEST(DataLayout, UnimplementedTypeInterface) { … }
TEST(DataLayout, SevenBitByte) { … }