[flang-commits] [flang] [flang][OpenMP] Add optional SemanticsContext parameter to loop utili… (PR #191231)
Krzysztof Parzyszek via flang-commits
flang-commits at lists.llvm.org
Fri Apr 10 05:58:59 PDT 2026
================
@@ -1035,16 +1050,17 @@ std::pair<WithReason<int64_t>, bool> GetAffectedNestDepthWithReason(
// Return the range of the affected nests in the sequence:
// {first, count, std::move(reason)}.
WithReason<std::pair<int64_t, int64_t>> GetAffectedLoopRangeWithReason(
- const parser::OmpDirectiveSpecification &spec, unsigned version) {
+ const parser::OmpDirectiveSpecification &spec, unsigned version,
+ SemanticsContext *semaCtx) {
llvm::omp::Directive dir{spec.DirId()};
if (dir == llvm::omp::Directive::OMPD_fuse) {
std::string name{GetUpperName(llvm::omp::Clause::OMPC_looprange, version)};
if (auto *clause{
parser::omp::FindClause(spec, llvm::omp::Clause::OMPC_looprange)}) {
auto &range{DEREF(parser::Unwrap<parser::OmpLooprangeClause>(clause->u))};
- std::optional<int64_t> first{GetIntValue(std::get<0>(range.t))};
- std::optional<int64_t> count{GetIntValue(std::get<1>(range.t))};
+ auto first{GetIntValueFromExpr(std::get<0>(range.t), semaCtx)};
----------------
kparzysz wrote:
Done
https://github.com/llvm/llvm-project/pull/191231
More information about the flang-commits
mailing list