12#ifndef CLANG_CIR_DIALECT_IR_CIRDATALAYOUT_H
13#define CLANG_CIR_DIALECT_IR_CIRDATALAYOUT_H
15#include "mlir/Dialect/DLTI/DLTI.h"
16#include "mlir/IR/BuiltinOps.h"
25 bool bigEndian =
false;
34 void reset(mlir::DataLayoutSpecInterface spec);
39 llvm::Align
getAlignment(mlir::Type ty,
bool abiOrPref)
const;
54 return {llvm::divideCeil(baseSize.getKnownMinValue(), 8),
55 baseSize.isScalable()};
llvm::Align getAlignment(mlir::Type ty, bool abiOrPref) const
Internal helper method that returns requested alignment for type.
void reset(mlir::DataLayoutSpecInterface spec)
Parse a data layout string (with fallback to default values).
llvm::TypeSize getTypeAllocSize(mlir::Type ty) const
Returns the offset in bytes between successive objects of the specified type, including alignment pad...
llvm::Align getABITypeAlign(mlir::Type ty) const
llvm::TypeSize getTypeSizeInBits(mlir::Type ty) const
llvm::TypeSize getTypeStoreSize(mlir::Type ty) const
Returns the maximum number of bytes that may be overwritten by storing the specified type.