Changeset View
Changeset View
Standalone View
Standalone View
mlir/include/mlir/Dialect/LLVMIR/LLVMTypes.h
Show First 20 Lines • Show All 137 Lines • ▼ Show 20 Lines | public: | ||||
/// Utilities used to generate integer types. | /// Utilities used to generate integer types. | ||||
static LLVMType getIntNTy(MLIRContext *context, unsigned numBits); | static LLVMType getIntNTy(MLIRContext *context, unsigned numBits); | ||||
static LLVMType getInt1Ty(MLIRContext *context) { | static LLVMType getInt1Ty(MLIRContext *context) { | ||||
return getIntNTy(context, /*numBits=*/1); | return getIntNTy(context, /*numBits=*/1); | ||||
} | } | ||||
static LLVMType getInt8Ty(MLIRContext *context) { | static LLVMType getInt8Ty(MLIRContext *context) { | ||||
return getIntNTy(context, /*numBits=*/8); | return getIntNTy(context, /*numBits=*/8); | ||||
} | } | ||||
static LLVMType getInt8PtrTy(MLIRContext *context) { | static LLVMType getInt8PtrTy(MLIRContext *context, unsigned addrSpace = 0) { | ||||
return getInt8Ty(context).getPointerTo(); | return getInt8Ty(context).getPointerTo(addrSpace); | ||||
} | } | ||||
static LLVMType getInt16Ty(MLIRContext *context) { | static LLVMType getInt16Ty(MLIRContext *context) { | ||||
return getIntNTy(context, /*numBits=*/16); | return getIntNTy(context, /*numBits=*/16); | ||||
} | } | ||||
static LLVMType getInt32Ty(MLIRContext *context) { | static LLVMType getInt32Ty(MLIRContext *context) { | ||||
return getIntNTy(context, /*numBits=*/32); | return getIntNTy(context, /*numBits=*/32); | ||||
} | } | ||||
static LLVMType getInt64Ty(MLIRContext *context) { | static LLVMType getInt64Ty(MLIRContext *context) { | ||||
▲ Show 20 Lines • Show All 473 Lines • Show Last 20 Lines |