[PATCH] D114379: [OMPIRBuilder] Add support for simd (loop) directive.
Arnamoy B via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 1 07:37:21 PST 2021
arnamoy10 added inline comments.
================
Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:2586-2587
void CodeGenFunction::EmitOMPSimdDirective(const OMPSimdDirective &S) {
+
+ bool UseOMPIRBuilder = CGM.getLangOpts().OpenMPIRBuilder;
+ if (UseOMPIRBuilder) {
----------------
Meinersbur wrote:
> [nit] Unnecessary whitespace
I took a look at `isSupportedByOpenMPIRBuilder()` and seems like it is more suitable for a check against work-sharing loop construct, not for `simd`.
And for `simd`, I am not sure what features I should be checking for. One check I can think of is checking whether any of the not-yet-supported clauses is present in the simd directive or not. Am I on the right track?
================
Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:2594
+ // Emit the associated statement and get its loop representation.
+ auto DL = SourceLocToDebugLoc(S.getBeginLoc());
+ const Stmt *Inner = S.getRawStmt();
----------------
Meinersbur wrote:
> [style] According to the [[ https://llvm.org/docs/CodingStandards.html#use-auto-type-deduction-to-make-code-more-readable | LLVM coding standard ]], `auto` is only used in specific cases.
I am inspired by [[ https://github.com/llvm/llvm-project/blob/003c9c7457d08888be5deeca7eee84ab5f110bf6/clang/lib/CodeGen/CGStmtOpenMP.cpp#L2611 | existing code ]] though
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114379/new/
https://reviews.llvm.org/D114379
More information about the llvm-commits
mailing list