Skip to content

Use ATTACH maps for array-sections/subscripts on pointers. #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 29 commits into
base: tgt-capture-mapped-ptrs-by-ref
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
cc90643
[WIP] Use ATTACH maps for array-sections/subscripts on pointers.
abhinavgaba Jun 11, 2025
6ba75e1
[WIP] Commit some more non-debug print changes.
abhinavgaba Jun 25, 2025
9408873
Merge branch 'tgt-capture-mapped-ptrs-by-ref' into map-ptr-array-sect…
abhinavgaba Jul 8, 2025
3ce181f
Fix findAttachComponent
abhinavgaba Jul 8, 2025
50c8d0e
Fix build issues, keep debug prints
abhinavgaba Jul 8, 2025
c23e01f
Fix handling of array-sections in findAttachComponent
abhinavgaba Jul 8, 2025
9adf9a8
Fix one test.
abhinavgaba Jul 8, 2025
ca0c381
Merge branch 'tgt-capture-mapped-ptrs-by-ref' into map-ptr-array-sect…
abhinavgaba Jul 8, 2025
36f6d9b
Fix star case. Update some tests.
abhinavgaba Jul 9, 2025
8349a49
Refactor AddAttachEntry
abhinavgaba Jul 9, 2025
eaf332f
Delay addition of attach when we populate PartialStruct.
abhinavgaba Jul 9, 2025
da55bf8
Update some more tests.
abhinavgaba Jul 16, 2025
fcdc13a
More test updates
abhinavgaba Jul 16, 2025
c35d7a0
[WIP][Offload] Introduce ATTACH map-type support for pointer attachment.
abhinavgaba Jul 16, 2025
13faca1
Minor formatting changes.
abhinavgaba Jul 16, 2025
54b2ae4
Remove debug prints.
abhinavgaba Jul 16, 2025
00b0767
Limit attach map-type generation to only map-entering constructs.
abhinavgaba Jul 16, 2025
baa9dbb
Minor clean-up
abhinavgaba Jul 16, 2025
c0d20e9
Minor NFC changes.
abhinavgaba Jul 20, 2025
a9b94d4
Use lb instead of base when attaching to a partialstruct.
abhinavgaba Jul 20, 2025
f1acc37
[NFC] Move computation of ptr/ptee addrs outside the loop.
abhinavgaba Jul 21, 2025
976470c
[NFC] Return Expr* from findAttachBasePtr.
abhinavgaba Jul 21, 2025
fd2d077
[NFC] Minor renaming/comment changes.
abhinavgaba Jul 21, 2025
fdced7d
Fix call to getAttachptrPteeAddrs.
abhinavgaba Jul 21, 2025
d791cb3
Remove unnecessary include.
abhinavgaba Jul 21, 2025
df62d2e
No need to compute the pointee address from scratch.
abhinavgaba Jul 22, 2025
63d2ca4
Update tests after avoiding creating pointee addr, and a minor commen…
abhinavgaba Jul 22, 2025
c9f8c0a
Move initialization of FinalLowestElem earlier.
abhinavgaba Jul 22, 2025
f044a56
Improve readability, add some more comments.
abhinavgaba Jul 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions clang/include/clang/Basic/OpenMPKinds.h
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,14 @@ bool isOpenMPTargetExecutionDirective(OpenMPDirectiveKind DKind);
/// otherwise - false.
bool isOpenMPTargetDataManagementDirective(OpenMPDirectiveKind DKind);

/// Checks if the specified directive is a map-entering target directive.
/// \param DKind Specified directive.
/// \return true - the directive is a map-entering target directive like
/// 'omp target', 'omp target data', 'omp target enter data',
/// 'omp target parallel', etc. (excludes 'omp target exit data', 'omp target
/// update') otherwise - false.
bool isOpenMPTargetMapEnteringDirective(OpenMPDirectiveKind DKind);

/// Checks if the specified composite/combined directive constitutes a teams
/// directive in the outermost nest. For example
/// 'omp teams distribute' or 'omp teams distribute parallel for'.
Expand Down
5 changes: 5 additions & 0 deletions clang/lib/Basic/OpenMPKinds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,11 @@ bool clang::isOpenMPTargetDataManagementDirective(OpenMPDirectiveKind DKind) {
DKind == OMPD_target_exit_data || DKind == OMPD_target_update;
}

bool clang::isOpenMPTargetMapEnteringDirective(OpenMPDirectiveKind DKind) {
return DKind == OMPD_target_data || DKind == OMPD_target_enter_data ||
isOpenMPTargetExecutionDirective(DKind);
}

bool clang::isOpenMPNestingTeamsDirective(OpenMPDirectiveKind DKind) {
if (DKind == OMPD_teams)
return true;
Expand Down
Loading