abhinavgaba wrote:
> better to split the patch by the supported types or other criteria
That's going to be a bit complicated. Trying to break the change based on
functional components was leaving clang in a bad intermediate state. That's why
#145454 was pulled into the main PR #153683.
Simila
https://github.com/abhinavgaba updated
https://github.com/llvm/llvm-project/pull/155625
>From 8256e93c46ddd4e0fdd4125b769f040741e56890 Mon Sep 17 00:00:00 2001
From: Abhinav Gaba
Date: Wed, 27 Aug 2025 07:02:36 -0700
Subject: [PATCH 1/3] [NFC][Clang] Add helper functions/utils for
finding/comp
https://github.com/abhinavgaba updated
https://github.com/llvm/llvm-project/pull/155625
>From 8256e93c46ddd4e0fdd4125b769f040741e56890 Mon Sep 17 00:00:00 2001
From: Abhinav Gaba
Date: Wed, 27 Aug 2025 07:02:36 -0700
Subject: [PATCH 1/2] [NFC][Clang] Add helper functions/utils for
finding/comp
@@ -6765,12 +6765,256 @@ llvm::Value
*CGOpenMPRuntime::emitNumThreadsForTargetDirective(
namespace {
LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE();
+/// Utility to compare expression locations.
+/// Returns true if expr-loc of LHS is less-than that of RHS.
+/// This function asser
https://github.com/abhinavgaba ready_for_review
https://github.com/llvm/llvm-project/pull/155625
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/abhinavgaba created
https://github.com/llvm/llvm-project/pull/155625
These have been pulled out of the codegen PR #153683, to reduce the size of
that PR.
>From 8256e93c46ddd4e0fdd4125b769f040741e56890 Mon Sep 17 00:00:00 2001
From: Abhinav Gaba
Date: Wed, 27 Aug 2025 07:02:
https://github.com/abhinavgaba edited
https://github.com/llvm/llvm-project/pull/153683
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/abhinavgaba edited
https://github.com/llvm/llvm-project/pull/153683
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/abhinavgaba edited
https://github.com/llvm/llvm-project/pull/153683
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -40,11 +40,28 @@ void foo() {
}
#endif
-// CHECK: @.offload_sizes = private unnamed_addr constant [5 x i64] [i64 8,
i64 0, i64 0, i64 0, i64 4]
-// CHECK-NOT: @.offload_sizes = private unnamed_addr constant [6 x i64] [i64
8, i64 0, i64 0, i64 0, i64 8, i64 4]
-// CHECK: @
@@ -40,11 +40,28 @@ void foo() {
}
#endif
-// CHECK: @.offload_sizes = private unnamed_addr constant [5 x i64] [i64 8,
i64 0, i64 0, i64 0, i64 4]
-// CHECK-NOT: @.offload_sizes = private unnamed_addr constant [6 x i64] [i64
8, i64 0, i64 0, i64 0, i64 8, i64 4]
-// CHECK: @
abhinavgaba wrote:
This is currently failing. Please ignore.
https://github.com/llvm/llvm-project/pull/153683
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe
abhinavgaba wrote:
This test is currently failing. The IR hasn't been updated.
https://github.com/llvm/llvm-project/pull/153683
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/ma
abhinavgaba wrote:
Please look at the comments in this example to see the maps we are emitting.
It's a smaller/easier to read test.
https://github.com/llvm/llvm-project/pull/153683
___
cfe-commits mailing list
cfe-co
abhinavgaba wrote:
Thanks for the PR. I haven't been able to look at how it can work along with
the pointer-attachment rework.
Please look at https://github.com/llvm/llvm-project/pull/153683/ when you get a
chance. The updates tests have comments showing the current maps being emitted.
In tha
https://github.com/abhinavgaba edited
https://github.com/llvm/llvm-project/pull/153683
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
abhinavgaba wrote:
> Even for cases where both the pointer, pointee are mapped, the expectation is
> for the pointer to still be captured by-ref.
>Why?
Because we don't know if the pointer/pointee were both already existing on the
device, in which case, there should be no pointer-attachment fo
abhinavgaba wrote:
> I have one big question - why do we need this? If pointer is mapped
> explicitly, it becomes an attached pointer, which cannot be modified in
> target region. How we capture/process it, byref or byval, does not matter, we
> can do whatever is better. So, why do we need to
@@ -8811,8 +8829,19 @@ class MappableExprsHandler {
++EI;
}
}
-llvm::stable_sort(DeclComponentLists, [](const MapData &LHS,
- const MapData &RHS) {
+llvm::stable_sort(DeclComponentLists, [VD](const MapData &L
@@ -8811,8 +8829,19 @@ class MappableExprsHandler {
++EI;
}
}
-llvm::stable_sort(DeclComponentLists, [](const MapData &LHS,
- const MapData &RHS) {
+llvm::stable_sort(DeclComponentLists, [VD](const MapData &L
https://github.com/abhinavgaba ready_for_review
https://github.com/llvm/llvm-project/pull/146934
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,83 @@
+// RUN: %libomptarget-compilexx-run-and-check-generic
+
+#include
+#include
+
+int x[10];
+
+void f1() {
+ int *p;
+ p = &x[0];
+ p[0] = 111;
+ p[1] = 222;
+ p[2] = 333;
+ p[3] = 444;
+
+#pragma omp target enter data map(to : p)
+#pragma omp target enter
https://github.com/abhinavgaba ready_for_review
https://github.com/llvm/llvm-project/pull/146891
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/abhinavgaba updated
https://github.com/llvm/llvm-project/pull/146891
>From 9f61909419939491c12384f471df05a504068054 Mon Sep 17 00:00:00 2001
From: Abhinav Gaba
Date: Wed, 2 Jul 2025 00:32:33 -0700
Subject: [PATCH 1/2] [NFC][Clang] Refactor mapinfo generation for captured
var
@@ -8727,11 +8733,13 @@ class MappableExprsHandler {
}
}
- /// Generate the base pointers, section pointers, sizes, map types, and
- /// mappers associated to a given capture (all included in \a CombinedInfo).
- void generateInfoForCapture(const CapturedStmt::Capture
@@ -8826,6 +8830,51 @@ class MappableExprsHandler {
return (HasPresent && !HasPresentR) || (HasAllocs && !HasAllocsR);
});
+auto GenerateInfoForComponentLists =
+[&](ArrayRef DeclComponentLists,
+bool IsEligibleForTargetParamFlag) {
+
https://github.com/abhinavgaba created
https://github.com/llvm/llvm-project/pull/146891
The refactored code would allow creating multiple member-of maps for the same
captured var, which would be useful for changes like
https://github.com/llvm/llvm-project/pull/145454.
>From 9f61909419939491c1
https://github.com/abhinavgaba edited
https://github.com/llvm/llvm-project/pull/145454
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -8811,8 +8829,19 @@ class MappableExprsHandler {
++EI;
}
}
-llvm::stable_sort(DeclComponentLists, [](const MapData &LHS,
- const MapData &RHS) {
+llvm::stable_sort(DeclComponentLists, [VD](const MapData &L
https://github.com/abhinavgaba edited
https://github.com/llvm/llvm-project/pull/145454
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -8811,8 +8829,19 @@ class MappableExprsHandler {
++EI;
}
}
-llvm::stable_sort(DeclComponentLists, [](const MapData &LHS,
- const MapData &RHS) {
+llvm::stable_sort(DeclComponentLists, [VD](const MapData &L
@@ -1,174 +1,178 @@
-// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
UTC_ARGS: --function-signature --include-generated-funcs --replace-value-regex
"__omp_offloading_[0-9a-z]+_[0-9a-z]+" "reduction_size[.].+[.]"
"pl_cond[.].+[.|,]" --prefix-fileche
https://github.com/abhinavgaba updated
https://github.com/llvm/llvm-project/pull/145454
>From d867ab3a20b1999cb5b00554fdb21cbe6766a1d5 Mon Sep 17 00:00:00 2001
From: Abhinav Gaba
Date: Sun, 22 Jun 2025 18:36:16 -0700
Subject: [PATCH 1/3] [Clang][OpenMP] Capture mapped pointers on `target` by
r
@@ -8811,8 +8829,19 @@ class MappableExprsHandler {
++EI;
}
}
-llvm::stable_sort(DeclComponentLists, [](const MapData &LHS,
- const MapData &RHS) {
+llvm::stable_sort(DeclComponentLists, [VD](const MapData &L
abhinavgaba wrote:
@alexey-bataev, please review.
https://github.com/llvm/llvm-project/pull/145454
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/abhinavgaba ready_for_review
https://github.com/llvm/llvm-project/pull/145454
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1,174 +1,178 @@
-// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
UTC_ARGS: --function-signature --include-generated-funcs --replace-value-regex
"__omp_offloading_[0-9a-z]+_[0-9a-z]+" "reduction_size[.].+[.]"
"pl_cond[.].+[.|,]" --prefix-fileche
@@ -8811,8 +8829,19 @@ class MappableExprsHandler {
++EI;
}
}
-llvm::stable_sort(DeclComponentLists, [](const MapData &LHS,
- const MapData &RHS) {
+llvm::stable_sort(DeclComponentLists, [VD](const MapData &L
@@ -1,174 +1,178 @@
-// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
UTC_ARGS: --function-signature --include-generated-funcs --replace-value-regex
"__omp_offloading_[0-9a-z]+_[0-9a-z]+" "reduction_size[.].+[.]"
"pl_cond[.].+[.|,]" --prefix-fileche
@@ -1,174 +1,178 @@
-// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
UTC_ARGS: --function-signature --include-generated-funcs --replace-value-regex
"__omp_offloading_[0-9a-z]+_[0-9a-z]+" "reduction_size[.].+[.]"
"pl_cond[.].+[.|,]" --prefix-fileche
https://github.com/abhinavgaba created
https://github.com/llvm/llvm-project/pull/145454
For the following:
```c
int *p;
#pragma omp target map(p[0]) //(A)
(void)p;
#pragma omp target map(p) // (B)
(void)p;
#pragma omp target map(p, p[0]) // (C)
(void)p;
#pragma omp ta
https://github.com/abhinavgaba updated
https://github.com/llvm/llvm-project/pull/145454
>From d867ab3a20b1999cb5b00554fdb21cbe6766a1d5 Mon Sep 17 00:00:00 2001
From: Abhinav Gaba
Date: Sun, 22 Jun 2025 18:36:16 -0700
Subject: [PATCH 1/2] [Clang][OpenMP] Capture mapped pointers on `target` by
r
@@ -1,174 +1,178 @@
-// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
UTC_ARGS: --function-signature --include-generated-funcs --replace-value-regex
"__omp_offloading_[0-9a-z]+_[0-9a-z]+" "reduction_size[.].+[.]"
"pl_cond[.].+[.|,]" --prefix-fileche
@@ -1,174 +1,178 @@
-// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
UTC_ARGS: --function-signature --include-generated-funcs --replace-value-regex
"__omp_offloading_[0-9a-z]+_[0-9a-z]+" "reduction_size[.].+[.]"
"pl_cond[.].+[.|,]" --prefix-fileche
abhinavgaba wrote:
Thanks, Alexey!
@sarnex, could you please help merge this? Windows build/test reports some
"Slowed tests" that are Driver/Architecture specific, and not related to this
change.
```
Slowest Tests:
--
109
https://github.com/abhinavgaba updated
https://github.com/llvm/llvm-project/pull/142511
>From 9d29860f69dec99aa435ea23c2f2559394ca771e Mon Sep 17 00:00:00 2001
From: Abhinav Gaba
Date: Wed, 28 May 2025 14:30:18 -0700
Subject: [PATCH 1/2] Create implicit mappers when mapping arrays of structs
w
abhinavgaba wrote:
@alexey-bataev, @jdoerfert, please help review. Thanks.
https://github.com/llvm/llvm-project/pull/142511
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/abhinavgaba edited
https://github.com/llvm/llvm-project/pull/142511
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/abhinavgaba ready_for_review
https://github.com/llvm/llvm-project/pull/142511
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
49 matches
Mail list logo