Home
last modified time | relevance | path

Searched refs:CharacterType (Results 1 – 25 of 26) sorted by relevance

12

/llvm-project-15.0.7/flang/include/flang/Optimizer/Builder/
H A DCharacter.h51 mlir::Value createBlankConstant(fir::CharacterType type);
120 static fir::CharacterType getCharType(mlir::Type type);
123 static fir::CharacterType getCharacterType(mlir::Type type);
124 static fir::CharacterType getCharacterType(const fir::CharBoxValue &box);
125 static fir::CharacterType getCharacterType(mlir::Value str);
190 mlir::Value createBlankConstantCode(fir::CharacterType type);
H A DFactory.h46 fir::dyn_cast_ptrEleTy(src.getType()).template cast<fir::CharacterType>(); in genCharacterCopy()
48 fir::dyn_cast_ptrEleTy(dst.getType()).template cast<fir::CharacterType>(); in genCharacterCopy()
58 auto toArrayTy = [&](fir::CharacterType ty) { in genCharacterCopy()
61 fir::CharacterType::getSingleton(ty.getContext(), ty.getFKind()))); in genCharacterCopy()
65 return seqTy.getEleTy().cast<fir::CharacterType>(); in genCharacterCopy()
/llvm-project-15.0.7/flang/lib/Optimizer/Builder/
H A DCharacter.cpp60 fir::CharacterType
66 fir::CharacterType
76 fir::CharacterType
83 static std::optional<fir::CharacterType::LenType>
86 if (len == fir::CharacterType::unknownLen()) in getCompileTimeLength()
105 auto charTy = ty.dyn_cast<fir::CharacterType>(); in materializeValue()
234 auto typeLen = fir::CharacterType::unknownLen(); in toScalarCharacter()
365 auto typeLen = fir::CharacterType::unknownLen(); in createCharacterTemp()
372 if (typeLen == fir::CharacterType::unknownLen()) in createCharacterTemp()
573 fir::CharacterType type) { in createBlankConstantCode()
[all …]
H A DMutableBox.cpp58 if (auto charTy = box.getEleTy().dyn_cast<fir::CharacterType>()) { in createNewFirBox()
67 if (charTy.getLen() == fir::CharacterType::unknownLen()) in createNewFirBox()
343 if (auto charTy = eleTy.dyn_cast<fir::CharacterType>()) { in createUnallocatedBox()
344 if (charTy.getLen() == fir::CharacterType::unknownLen()) { in createUnallocatedBox()
641 if (auto charTy = box.getEleTy().dyn_cast<fir::CharacterType>()) { in getNewLengths()
642 if (charTy.getLen() == fir::CharacterType::unknownLen()) { in getNewLengths()
H A DFIRBuilder.cpp347 auto type = fir::CharacterType::get(getContext(), 1, data.size()); in createStringLitOp()
748 } else if (auto charTy = eleTy.dyn_cast<fir::CharacterType>()) { in getFromBox()
842 auto type = fir::CharacterType::get(builder.getContext(), 1, str.size()); in createStringLiteral()
894 if (auto charTy = eleTy.dyn_cast<fir::CharacterType>()) { in componentToExtendedValue()
921 if (auto charTy = fieldTy.dyn_cast<fir::CharacterType>()) { in componentToExtendedValue()
923 if (cstLen == fir::CharacterType::unknownLen()) in componentToExtendedValue()
984 if (type.isa<fir::CharacterType>()) { in genScalarAssignment()
1178 if (auto charTy = eleTy.dyn_cast<fir::CharacterType>()) { in genLenOfCharacter()
/llvm-project-15.0.7/flang/include/flang/Optimizer/Dialect/
H A DFIRType.h127 inline bool isa_char(mlir::Type t) { return t.isa<fir::CharacterType>(); } in isa_char()
138 if (auto ct = t.dyn_cast_or_null<fir::CharacterType>()) in isa_char_string()
139 return ct.getLen() != fir::CharacterType::singleton(); in isa_char_string()
150 if (auto charTy = t.dyn_cast<fir::CharacterType>()) in characterWithDynamicLen()
H A DFIRTypes.td48 CharacterType getElementType(mlir::MLIRContext *context) const;
50 CharacterType getEleTy() const;
105 CharacterType is thus the type of both a single character value and a
109 let parameters = (ins "KindTy":$FKind, "CharacterType::LenType":$len);
117 static CharacterType getUnknownLen(mlir::MLIRContext *ctxt, KindTy kind) {
122 static CharacterType getSingleton(mlir::MLIRContext *ctxt, KindTy kind) {
413 CharacterType getElementType(mlir::MLIRContext *context) const;
415 CharacterType getEleTy() const;
H A DFIROps.td2386 OpBuilder<(ins "fir::CharacterType":$inType,
2389 OpBuilder<(ins "fir::CharacterType":$inType,
2392 OpBuilder<(ins "fir::CharacterType":$inType,
2395 OpBuilder<(ins "fir::CharacterType":$inType,
2563 Or<[CPred<"$_self.cast<mlir::TypeAttr>().getValue().isa<fir::CharacterType,"
/llvm-project-15.0.7/flang/lib/Optimizer/Dialect/
H A DFIRType.cpp425 CharacterType
427 return CharacterType::getUnknownLen(context, getKind()); in getElementType()
430 CharacterType fir::BoxCharType::getEleTy() const { in getEleTy()
439 mlir::Type fir::CharacterType::parse(mlir::AsmParser &parser) { in parse()
443 CharacterType::LenType len = 1; in parse()
446 len = fir::CharacterType::unknownLen(); in parse()
456 void fir::CharacterType::print(mlir::AsmPrinter &printer) const { in print()
459 if (len != fir::CharacterType::singleton()) { in print()
461 if (len == fir::CharacterType::unknownLen()) in print()
973 addTypes<BoxType, BoxCharType, BoxProcType, CharacterType, fir::ComplexType, in registerTypes()
H A DFIROps.cpp74 if (auto chrTy = ty.dyn_cast<fir::CharacterType>()) in verifyTypeParamCount()
78 if (auto chrTy = ty.dyn_cast<fir::CharacterType>()) in verifyTypeParamCount()
358 if (auto charTy = dynTy.dyn_cast<fir::CharacterType>()) in validTypeParams()
730 return t.dyn_cast<fir::CharacterType>(); in verify()
1178 if (!eleTy.dyn_cast_or_null<fir::CharacterType>()) in verify()
2207 auto c1 = t1.dyn_cast<fir::CharacterType>(); in areCompatibleCharacterTypes()
2208 auto c2 = t2.dyn_cast<fir::CharacterType>(); in areCompatibleCharacterTypes()
3159 return eleTy.cast<fir::CharacterType>().getFKind(); in stringLitOpGetKind()
3194 fir::CharacterType inType, in build()
3207 fir::CharacterType inType, in build()
[all …]
/llvm-project-15.0.7/flang/lib/Optimizer/CodeGen/
H A DTypeConverter.h68 [&](fir::CharacterType charTy) { return convertCharType(charTy); }); in LLVMTypeConverter()
286 unsigned characterBitsize(fir::CharacterType charTy) { in characterBitsize()
292 mlir::Type convertCharType(fir::CharacterType charTy) { in convertCharType()
294 if (charTy.getLen() == fir::CharacterType::unknownLen()) in convertCharType()
H A DCodeGen.cpp373 if (auto chrTy = scalarType.dyn_cast<fir::CharacterType>()) { in matchAndRewrite()
374 fir::CharacterType rawCharTy = fir::CharacterType::getUnknownLen( in matchAndRewrite()
631 auto charTy = constop.getType().cast<fir::CharacterType>(); in matchAndRewrite()
1232 if (auto ty = boxEleTy.dyn_cast<fir::CharacterType>()) {
1234 if (ty.getLen() != fir::CharacterType::unknownLen()) {
1570 if (auto charTy = seqEleTy.dyn_cast<fir::CharacterType>()) { in matchAndRewrite()
1602 auto charTy = seqEleTy.cast<fir::CharacterType>(); in matchAndRewrite()
1738 if (auto charTy = inputEleTy.dyn_cast<fir::CharacterType>()) { in matchAndRewrite()
2851 if (ty.isa<fir::CharacterType>()) { in matchAndRewrite()
/llvm-project-15.0.7/flang/unittests/Optimizer/Builder/Runtime/
H A DCharacterTest.cpp48 mlir::Type charTy = fir::CharacterType::get(builder.getContext(), kind, 10); in checkCharCompare1AllTypeForKind()
160 mlir::Type charTy = fir::CharacterType::get(builder.getContext(), kind, 10); in checkGenScan()
194 mlir::Type charTy = fir::CharacterType::get(builder.getContext(), kind, 10); in checkGenVerify()
/llvm-project-15.0.7/flang/lib/Optimizer/Transforms/
H A DCharacterConversion.cpp59 .cast<fir::CharacterType>(); in matchAndRewrite()
H A DArrayValueCopy.cpp914 ArrayLoadOp load, CharacterType charTy) { in getCharacterLen()
978 if (auto charTy = eleTy.dyn_cast<CharacterType>()) { in genArrayCopy()
1000 if (auto charTy = eleTy.dyn_cast<CharacterType>()) { in genArrayLoadTypeParameters()
/llvm-project-15.0.7/flang/lib/Lower/
H A DConvertExpr.cpp1286 fir::CharacterType::LenType newLen = fir::CharacterType::unknownLen(); in replaceScalarCharacterLength()
1287 mlir::Type newCharTy = fir::CharacterType::get( in replaceScalarCharacterLength()
1365 ty.cast<fir::CharacterType>().getFKind()); in genval()
1552 fir::CharacterType type = in genScalarLit()
2020 fir::CharacterType chTy = in genOffsetAndCoordinateOp()
2026 fir::CharacterType singleTy = in genOffsetAndCoordinateOp()
2371 if (seqTy.getEleTy().isa<fir::CharacterType>()) { in toExtendedValue()
2379 if (type.isa<fir::CharacterType>()) { in toExtendedValue()
5901 fir::CharacterType charTy = in genarr()
5965 fir::CharacterType charTy = in genarr()
[all …]
H A DConvertType.cpp84 Fortran::lower::LenParameterTy len = fir::CharacterType::unknownLen()) { in genCharacterType()
87 return fir::CharacterType::get(context, KIND, len); in genCharacterType()
H A DMangler.cpp269 if (auto character{t.dyn_cast<fir::CharacterType>()}) { in typeToString()
H A DCallInterface.cpp710 fir::CharacterType::LenType len = in handleImplicitCharacterResult()
711 constantLen ? *constantLen : fir::CharacterType::unknownLen(); in handleImplicitCharacterResult()
713 fir::CharacterType::get(&mlirContext, type.kind(), len)); in handleImplicitCharacterResult()
H A DHostAssociations.cpp197 converter.genType(sym).cast<fir::CharacterType>().getFKind(); in getType()
H A DConvertVariable.cpp241 auto targetLen = targetEleTy.cast<fir::CharacterType>().getLen(); in genInitialDataTarget()
242 auto ptrLen = unwrapElementType(boxType).cast<fir::CharacterType>().getLen(); in genInitialDataTarget()
250 if (targetLen == fir::CharacterType::unknownLen()) in genInitialDataTarget()
H A DAllocatable.cpp155 int kind = box.getEleTy().cast<fir::CharacterType>().getFKind(); in genRuntimeInitCharacter()
/llvm-project-15.0.7/flang/unittests/Optimizer/Builder/
H A DFIRBuilderTest.cpp255 auto type = fir::CharacterType::get(builder.getContext(), 1, 16); in TEST_F()
315 EXPECT_EQ(fir::CharacterType::get(builder.getContext(), 1, strValue.size()), in TEST_F()
/llvm-project-15.0.7/flang/lib/Optimizer/Builder/Runtime/
H A DCharacter.cpp42 if (auto charTy = ty.dyn_cast<fir::CharacterType>()) in discoverKind()
/llvm-project-15.0.7/flang/lib/Evaluate/
H A Dtools.cpp648 using CharacterType = typename Ty::Result; in ConvertToType() typedef
650 Expr<CharacterType>{SetLength<CharacterType::kind>{ in ConvertToType()

12