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<mlir::Type> convertRecordType(fir::RecordType derived,
68 bool requiresExtendedDesc(mlir::Type boxElementType)
const;
72 static constexpr int unknownRank() {
return -1; }
83 mlir::Type convertBoxProcType(BoxProcType boxproc)
const;
85 unsigned characterBitsize(fir::CharacterType charTy)
const;
89 mlir::Type convertCharType(fir::CharacterType charTy)
const;
91 template <
typename A> mlir::Type convertPointerLike(A &ty)
const {
92 return mlir::LLVM::LLVMPointerType::get(ty.getContext());
96 std::optional<mlir::Type> convertSequenceType(SequenceType seq)
const;
101 mlir::Type convertTypeDescType(mlir::MLIRContext *ctx)
const;
103 const KindMapping &getKindMap()
const {
return kindMapping; }
106 void attachTBAATag(mlir::LLVM::AliasAnalysisOpInterface op,
107 mlir::Type baseFIRType, mlir::Type accessFIRType,
108 mlir::LLVM::GEPOp gep)
const;
110 const mlir::DataLayout &getDataLayout()
const {
111 assert(dataLayout &&
"must be set in ctor");
117 std::unique_ptr<CodeGenSpecifics> specifics;
118 std::unique_ptr<TBAABuilder> tbaaBuilder;
119 const mlir::DataLayout *dataLayout;