This repository has been archived by the owner on Jan 20, 2024. It is now read-only.
[WIP][MLIR][Flang] WIP additional mapping support #225
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
NOTE: this is a furthering of #217 based on Sergio's rebased of the PR 217 in #224. Starting fresh to maintain the commit history of PR 217.
This patch allows the current milestone 1 example we have to be extended to something like the below:
This is by no means full support for map for either implicit, explicit or declare target, but it will hopefully allow a bit more support for them when applied.
I intend to look into the declare target component for the time being, however, I will come back to the other argument types if no one gets around to them before I finish the declare target work! If someone wishes to build on or get some ideas of where to start with the map clauses to further increase support I can give a breakdown. However, if building on this patch, it likely needs the following extensions to start:
This is just some possible things that need done if using this patch as a base, but will generally give an idea of the extent of things that need doing for implicit/explicit map variables. And of course, anyone picking this up can do as they wish/best see fit these are suggestions from what I found doing this patch!
The following two Clang functions may be of interest when doing the above (although, not exhaustive, anywhere where the maptype enum or capture enum are referenced is of interest, in particular one really large map related function):
There's essentially a lot of special case operation generation for argument passing and accessing based on capture type inside of Clang.
There's a lot of TODO/FIXME's all over the place at the moment and some dump/outs, so please be aware if you directly apply the entire patch.
The patch also looks a little beefier than it should be as it applies some other phab patches I have to work, namely D149162 and D149368, the former is now upstreamed, so updating ATD on main will shrink the diff a little.