#include "DataLayoutImporter.h"
#include "mlir/Dialect/DLTI/DLTI.h"
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/BuiltinAttributes.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/Interfaces/DataLayoutInterfaces.h"
#include "mlir/Target/LLVMIR/Import.h"
#include "llvm/IR/DataLayout.h"
usingnamespacemlir;
usingnamespacemlir::LLVM;
usingnamespacemlir::LLVM::detail;
static constexpr StringRef kDefaultDataLayout = …;
FloatType mlir::LLVM::detail::getFloatType(MLIRContext *context,
unsigned width) { … }
FailureOr<StringRef>
DataLayoutImporter::tryToParseAlphaPrefix(StringRef &token) const { … }
FailureOr<uint64_t> DataLayoutImporter::tryToParseInt(StringRef &token) const { … }
FailureOr<SmallVector<uint64_t>>
DataLayoutImporter::tryToParseIntList(StringRef token) const { … }
FailureOr<DenseIntElementsAttr>
DataLayoutImporter::tryToParseAlignment(StringRef token) const { … }
FailureOr<DenseIntElementsAttr>
DataLayoutImporter::tryToParsePointerAlignment(StringRef token) const { … }
LogicalResult DataLayoutImporter::tryToEmplaceAlignmentEntry(Type type,
StringRef token) { … }
LogicalResult
DataLayoutImporter::tryToEmplacePointerAlignmentEntry(LLVMPointerType type,
StringRef token) { … }
LogicalResult
DataLayoutImporter::tryToEmplaceEndiannessEntry(StringRef endianness,
StringRef token) { … }
LogicalResult
DataLayoutImporter::tryToEmplaceAddrSpaceEntry(StringRef token,
llvm::StringLiteral spaceKey) { … }
LogicalResult
DataLayoutImporter::tryToEmplaceStackAlignmentEntry(StringRef token) { … }
void DataLayoutImporter::translateDataLayout(
const llvm::DataLayout &llvmDataLayout) { … }
DataLayoutSpecInterface
mlir::translateDataLayout(const llvm::DataLayout &dataLayout,
MLIRContext *context) { … }