[PATCH] D131526: [OMPIRBuilder] Add support for safelen clause
Dominik Adamski via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 10 01:41:28 PDT 2022
domada added inline comments.
================
Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:2598
for (OMPClause *C : S.clauses()) {
// Currently only simdlen clause is supported
+ if (!(isa<OMPSimdlenClause>(C) || isa<OMPSafelenClause>(C)))
----------------
Could you update this comment?
================
Comment at: llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:3045
+ if (!(Simdlen == nullptr && Safelen == nullptr)) {
+ ConstantInt *VectorizeWidth = Simdlen == nullptr ? Safelen : Simdlen;
addLoopMetadata(
----------------
Could you add comment which describes how simdlen and safelen clauses work?
BTW. Have you checked invalid test case where safelen < simdlen?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131526/new/
https://reviews.llvm.org/D131526
More information about the cfe-commits
mailing list