49class LLVMTypeConverter :
public mlir::LLVMTypeConverter {
51 LLVMTypeConverter(mlir::ModuleOp module,
bool applyTBAA,
52 bool forceUnifiedTBAATree,
const mlir::DataLayout &);
56 mlir::Type offsetType()
const;
59 mlir::Type indexType()
const;
62 std::optional<mlir::Type> convertRecordType(fir::RecordType derived,
67 bool requiresExtendedDesc(mlir::Type boxElementType)
const;
71 static constexpr int unknownRank() {
return -1; }
82 mlir::Type convertBoxProcType(BoxProcType boxproc)
const;
84 unsigned characterBitsize(fir::CharacterType charTy)
const;
88 mlir::Type convertCharType(fir::CharacterType charTy)
const;
90 template <
typename A> mlir::Type convertPointerLike(A &ty)
const {
91 return mlir::LLVM::LLVMPointerType::get(ty.getContext());
95 std::optional<mlir::Type> convertSequenceType(SequenceType seq)
const;
100 mlir::Type convertTypeDescType(mlir::MLIRContext *ctx)
const;
102 const KindMapping &getKindMap()
const {
return kindMapping; }
105 void attachTBAATag(mlir::LLVM::AliasAnalysisOpInterface op,
106 mlir::Type baseFIRType, mlir::Type accessFIRType,
107 mlir::LLVM::GEPOp gep)
const;
109 const mlir::DataLayout &getDataLayout()
const {
110 assert(dataLayout &&
"must be set in ctor");
116 std::unique_ptr<CodeGenSpecifics> specifics;
117 std::unique_ptr<TBAABuilder> tbaaBuilder;
118 const mlir::DataLayout *dataLayout;