50class LLVMTypeConverter :
public mlir::LLVMTypeConverter {
52 LLVMTypeConverter(mlir::ModuleOp module,
bool applyTBAA,
53 bool forceUnifiedTBAATree,
const mlir::DataLayout &);
57 mlir::Type offsetType()
const;
60 mlir::Type indexType()
const;
63 std::optional<llvm::LogicalResult>
64 convertRecordType(fir::RecordType derived,
65 llvm::SmallVectorImpl<mlir::Type> &results,
bool isPacked);
69 bool requiresExtendedDesc(mlir::Type boxElementType)
const;
73 static constexpr int unknownRank() {
return -1; }
84 mlir::Type convertBoxProcType(BoxProcType boxproc)
const;
86 unsigned characterBitsize(fir::CharacterType charTy)
const;
90 mlir::Type convertCharType(fir::CharacterType charTy)
const;
92 template <
typename A> mlir::Type convertPointerLike(A &ty)
const {
93 return mlir::LLVM::LLVMPointerType::get(ty.getContext());
97 mlir::Type convertSequenceType(SequenceType seq)
const;
102 mlir::Type convertTypeDescType(mlir::MLIRContext *ctx)
const;
104 const KindMapping &getKindMap()
const {
return kindMapping; }
107 void attachTBAATag(mlir::LLVM::AliasAnalysisOpInterface op,
108 mlir::Type baseFIRType, mlir::Type accessFIRType,
109 mlir::LLVM::GEPOp gep)
const;
111 const mlir::DataLayout &getDataLayout()
const {
112 assert(dataLayout &&
"must be set in ctor");
118 std::unique_ptr<CodeGenSpecifics> specifics;
119 std::unique_ptr<TBAABuilder> tbaaBuilder;
120 const mlir::DataLayout *dataLayout;