Lines Matching defs:hlfir
27 namespace hlfir {
30 } // namespace hlfir
37 class AssignOpConversion : public mlir::OpRewritePattern<hlfir::AssignOp> {
42 matchAndRewrite(hlfir::AssignOp assignOp,
45 hlfir::Entity lhs(assignOp.getLhs());
46 hlfir::Entity rhs(assignOp.getRhs());
50 if (mlir::isa<hlfir::ExprType>(rhs.getType())) {
51 mlir::emitError(loc, "hlfir must be bufferized with --bufferize-hlfir "
56 hlfir::translateToExtendedValue(loc, builder, rhs);
58 hlfir::translateToExtendedValue(loc, builder, lhs);
164 class CopyInOpConversion : public mlir::OpRewritePattern<hlfir::CopyInOp> {
175 hlfir::CopyInOp copyInOp) {
212 hlfir::CopyInOp copyInOp) {
235 matchAndRewrite(hlfir::CopyInOp copyInOp,
247 class CopyOutOpConversion : public mlir::OpRewritePattern<hlfir::CopyOutOp> {
253 matchAndRewrite(hlfir::CopyOutOp copyOutOp,
288 class DeclareOpConversion : public mlir::OpRewritePattern<hlfir::DeclareOp> {
294 matchAndRewrite(hlfir::DeclareOp declareOp,
310 // Propagate other attributes from hlfir.declare to fir.declare.
324 // Helper to generate the hlfir fir.box with the local lower bounds and
364 // preserve the optional aspect: the hlfir fir.box should be null if
365 // the entity is absent so that later fir.is_present on the hlfir base
401 : public mlir::OpRewritePattern<hlfir::DesignateOp> {
407 hlfir::DesignateOp designate, mlir::Type baseEleTy, mlir::Value base,
433 matchAndRewrite(hlfir::DesignateOp designate,
438 hlfir::Entity baseEntity(designate.getMemref());
441 TODO(loc, "hlfir::designate load of pointer or allocatable");
445 auto [base, shape] = hlfir::genVariableFirBaseShapeAndParams(
447 mlir::Type baseEleTy = hlfir::getFortranElementType(base.getType());
448 mlir::Type resultEleTy = hlfir::getFortranElementType(designateResultType);
454 TODO(loc, "hlfir.designate with a parametrized derived type base");
480 baseEleTy = hlfir::getFortranElementType(componentType);
519 llvm::SmallVector<mlir::Value> lbounds = hlfir::genLowerbounds(
633 hlfir::Entity baseEntity) {
637 for (auto [lb, ub] : hlfir::genBounds(loc, builder, baseEntity)) {
647 : public mlir::OpRewritePattern<hlfir::ParentComponentOp> {
653 matchAndRewrite(hlfir::ParentComponentOp parentComponent,
670 hlfir::Entity base{parentComponent.getMemref()};
695 : public mlir::OpRewritePattern<hlfir::NoReassocOp> {
701 matchAndRewrite(hlfir::NoReassocOp noreassoc,
709 class NullOpConversion : public mlir::OpRewritePattern<hlfir::NullOp> {
714 matchAndRewrite(hlfir::NullOp nullop,
722 : public mlir::OpRewritePattern<hlfir::GetExtentOp> {
724 using mlir::OpRewritePattern<hlfir::GetExtentOp>::OpRewritePattern;
727 matchAndRewrite(hlfir::GetExtentOp getExtentOp,
731 // the hlfir.shape_of operation which led to the creation of this get_extent
749 : public hlfir::impl::ConvertHLFIRtoFIRBase<ConvertHLFIRtoFIR> {
752 // TODO: like "bufferize-hlfir" pass, runtime signature may be added
764 target.addIllegalDialect<hlfir::hlfirDialect>();