[Openmp-commits] [flang] [llvm] [mlir] [openmp] [MLIR][OpenMP] Add omp.fuse operation (PR #168898)
Ferran Toda via Openmp-commits
openmp-commits at lists.llvm.org
Tue Jan 27 07:58:39 PST 2026
================
@@ -852,32 +853,37 @@ int64_t collectLoopRelatedInfo(
numCollapse = collapseValue;
}
- collectLoopRelatedInfo(converter, currentLocation, eval, numCollapse, result,
- iv);
+ collectLoopRelatedInfo(converter, currentLocation, eval, nestedEval,
+ numCollapse, result, iv);
return numCollapse;
}
void collectLoopRelatedInfo(
lower::AbstractConverter &converter, mlir::Location currentLocation,
- lower::pft::Evaluation &eval, int64_t numCollapse,
- mlir::omp::LoopRelatedClauseOps &result,
+ lower::pft::Evaluation &eval, lower::pft::Evaluation *nestedEval,
+ int64_t numCollapse, mlir::omp::LoopRelatedClauseOps &result,
llvm::SmallVectorImpl<const semantics::Symbol *> &iv) {
fir::FirOpBuilder &firOpBuilder = converter.getFirOpBuilder();
// Collect the loops to collapse.
- lower::pft::Evaluation *doConstructEval = getNestedDoConstruct(eval);
+ lower::pft::Evaluation *doConstructEval = nestedEval;
if (doConstructEval->getIf<parser::DoConstruct>()->IsDoConcurrent()) {
TODO(currentLocation, "Do Concurrent in Worksharing loop construct");
}
// Collect sizes from tile directive if present.
std::int64_t sizesLengthValue = 0l;
if (auto *ompCons{eval.getIf<parser::OpenMPConstruct>()}) {
- processTileSizesFromOpenMPConstruct(
- ompCons, [&](const parser::OmpClause::Sizes *tclause) {
- sizesLengthValue = tclause->v.size();
- });
+ if (auto *ompLoop{std::get_if<parser::OpenMPLoopConstruct>(&ompCons->u)}) {
+ const parser::OmpDirectiveSpecification &beginSpec{ompLoop->BeginDir()};
+ if (beginSpec.DirId() == llvm::omp::Directive::OMPD_tile) {
----------------
NouTimbaler wrote:
Right
https://github.com/llvm/llvm-project/pull/168898
More information about the Openmp-commits
mailing list