This revision was automatically updated to reflect the committed changes.
Closed by commit rG9fbd33ad623d: [OMPIRBuilder] Add support for simd (loop)
directive. (authored by arnamoy10).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114379/new/
arnamoy10 updated this revision to Diff 400958.
arnamoy10 added a comment.
Making any_of one-liner.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114379/new/
https://reviews.llvm.org/D114379
Files:
clang/lib/CodeGen/CGStmtOpenMP.cpp
clang/test/OpenMP/irbuilder_simd.cpp
Meinersbur added inline comments.
Comment at: llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp:1691-1696
+ bool Found = false;
+ if (llvm::any_of(*LoopBody, [](Instruction ) {
+return I.getMetadata("llvm.access.group") != nullptr;
+ }))
+Found = true;
+
arnamoy10 updated this revision to Diff 400830.
arnamoy10 added a comment.
1. Trying to tackle a test failure
2. Adding `any_of()` as per reviewer's suggestion.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114379/new/
https://reviews.llvm.org/D114379
Files:
Meinersbur accepted this revision.
Meinersbur added a comment.
This revision is now accepted and ready to land.
LGTM. Thanks for the patch.
Comment at: llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp:1696
+ }
+ EXPECT_EQ(Found, true);
+}
It would also be
arnamoy10 updated this revision to Diff 400631.
arnamoy10 added a comment.
Updating as per reviewers comments.
Adding a test case in `OpenMPIRBuilderTest.cpp`
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114379/new/
https://reviews.llvm.org/D114379
Files:
Meinersbur added inline comments.
Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:2587
+ // Check for unsupported clauses
+ if (S.clauses().size() > 0) {
+// Currently no clause is supported
Comment at:
Meinersbur added a comment.
[testing] Could you add a test for `applySimd` into `OpenMPIRBuilderTests.cpp`,
so we have a test that is independent of Clang?
Comment at: clang/test/OpenMP/irbuilder_simd.cpp:3
+// expected-no-diagnostics
+// RUN: %clang_cc1
arnamoy10 updated this revision to Diff 394046.
arnamoy10 added a comment.
Thanks @Meinersbur for the comments. Addressing reviewers comments:
1. Update code to make the matadata addition correct, as per reviewers comments.
2. Using `LoopInfo` to identify BasicBlocks to iterate through.
3.
Meinersbur requested changes to this revision.
Meinersbur added inline comments.
This revision now requires changes to proceed.
Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:2588-2594
+if (isa(C) || isa(C) ||
+isa(C) || isa(C) ||
+isa(C) || isa(C) ||
+
arnamoy10 updated this revision to Diff 392189.
arnamoy10 added a comment.
Addressing reviewers comments Major changes are as follows:
1. Skipping unsupported clauses and skip the case when there is an ordered
directive inside the simd construct
2. Traversing all the blocks in the Canonical
Meinersbur added inline comments.
Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:2586-2587
void CodeGenFunction::EmitOMPSimdDirective(const OMPSimdDirective ) {
+
+ bool UseOMPIRBuilder = CGM.getLangOpts().OpenMPIRBuilder;
+ if (UseOMPIRBuilder) {
arnamoy10
arnamoy10 added inline comments.
Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:2586-2587
void CodeGenFunction::EmitOMPSimdDirective(const OMPSimdDirective ) {
+
+ bool UseOMPIRBuilder = CGM.getLangOpts().OpenMPIRBuilder;
+ if (UseOMPIRBuilder) {
Meinersbur
Meinersbur requested changes to this revision.
Meinersbur added a comment.
This revision now requires changes to proceed.
Thanks for helping to complete the OpenMPIRBuilder implementation!
Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:2586-2587
void
tschuett added inline comments.
Comment at: llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:2121
+static void addSIMDMetadata(BasicBlock *block,
+ArrayRef Properties) {
+ for (auto : *block) {
Properties is unused in the function?
tschuett added inline comments.
Comment at: llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h:520
+ /// Add metadata to simd-ise a loop.
+ ///
I believe LLVM uses American English.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
arnamoy10 created this revision.
arnamoy10 added reviewers: kiranchandramohan, peixin, bryanpkc, Meinersbur.
Herald added a subscriber: hiraditya.
arnamoy10 requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: llvm-commits, cfe-commits, sstefan1.
Herald
17 matches
Mail list logo