[PATCH] D102400: [flang] [openmp] Add Fortran specific semantic check 4 for OpenMP Allocate directive.
Kiran Chandramohan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 4 06:17:26 PDT 2021
kiranchandramohan requested changes to this revision.
kiranchandramohan added inline comments.
This revision now requires changes to proceed.
================
Comment at: flang/lib/Semantics/check-omp-structure.cpp:259
+ context_.Say(source,
+ "If list items within the ALLOCATE directive have the SAVE attribute, are a common block name, or are declared in the scope of a module, then only predefined memory allocator parameters can be used in the allocator clause"_err_en_US);
+ }
----------------
Nit: Can this be limited to 80 characters per line?
================
Comment at: flang/lib/Semantics/check-omp-structure.cpp:265
+ },
+ [&](const parser::Name &name) {},
+ },
----------------
What about here? I think common blocks come here? Can you add a test and check?
================
Comment at: flang/lib/Semantics/check-omp-structure.cpp:658
+ CheckAllowed(llvm::omp::Clause::OMPC_allocator);
+ isPredefinedAllocator = GetIntValue(x.v).has_value();
+ RequiresPositiveParameter(llvm::omp::Clause::OMPC_allocator, x.v);
----------------
Nit: Add a comment explaining why this code works in identifying predefined allocators.
================
Comment at: flang/lib/Semantics/check-omp-structure.h:235
+ const parser::OmpObjectList &ompObjectList);
+ bool isPredefinedAllocator;
};
----------------
Nit:Can this be initialized to a value?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102400/new/
https://reviews.llvm.org/D102400
More information about the llvm-commits
mailing list