https://github.com/agozillon created https://github.com/llvm/llvm-project/pull/81510
This patch seeks to refactor slightly and extend the current record type map support that was put in place for Fortran's descriptor types to handle explicit member mapping for record types at a single level of depth (the case of explicit mapping of nested record types is currently unsupported). This patch seeks to support this by extending the OpenMPToLLVMIRTranslation phase to more generally support record types, building on the prior groundwork in the Fortran allocatables/pointers patch. It now supports different kinds of record type mapping, in this case full record type mapping and then explicit member mapping in which there is a special case for certain types when mapped individually to not require any parent map link in the kernel argument structure. To facilitate this required: * The movement of the setting of the map flag type "ptr_and_obj" to respective frontends, now supporting it as a possible flag that can be read and printed in mlir form. Some minor changes to declare target map type setting was neccesary for this. * The addition of a member index array operand, which tracks the position of the member in the parent, required for caclulating the appropriate size to offload to the target, alongside the parents offload pointer (always the first member currently being mapped). * A partial mapping attribute operand, to indicate if the entire record type is being mapped or just member components, aiding the ability to lower record types in the different manners that are possible. * Refactoring bounds calculation for record types and general arrays to one location (as well as load/store generation prior to assigning to the kernel argument structure), as a side affect enter/exit/update/data mapping should now be more correct and fully support bounds mapping, previously this would have only worked for target. _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits