[flang] [llvm] [mlir] [flang][OpenMP] Enable tiling (PR #143715)
Jan Leyonberg via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 27 07:49:15 PDT 2025
================
@@ -418,6 +420,28 @@ static void processHostEvalClauses(lower::AbstractConverter &converter,
beginClauseList =
&std::get<parser::OmpClauseList>(beginDirective.t);
+ // For now we check if there is an inner OpenMPLoopConstruct, and
+ // extract the size clause from there
+ const auto &nestedOptional =
+ std::get<std::optional<parser::NestedConstruct>>(
+ ompConstruct.t);
+ assert(nestedOptional.has_value() &&
+ "Expected a DoConstruct or OpenMPLoopConstruct");
+ const auto *innerConstruct =
+ std::get_if<common::Indirection<parser::OpenMPLoopConstruct>>(
+ &(nestedOptional.value()));
+ if (innerConstruct) {
+ const auto &innerLoopConstruct = innerConstruct->value();
+ const auto &innerBegin =
+ std::get<parser::OmpBeginLoopDirective>(
+ innerLoopConstruct.t);
+ const auto &innerDirective =
+ std::get<parser::OmpLoopDirective>(innerBegin.t);
+ if (innerDirective.v == llvm::omp::Directive::OMPD_tile) {
+ middleClauseList =
+ &std::get<parser::OmpClauseList>(innerBegin.t);
+ }
+ }
----------------
jsjodin wrote:
This was removed since we are only using constants for now. Later PRs will have to update this.
https://github.com/llvm/llvm-project/pull/143715
More information about the llvm-commits
mailing list