This is an archive of the discontinued LLVM Phabricator instance.

Added mapping for pointers captured in Lambdas in OpenMP target regions
ClosedPublic

Authored by DavidTruby on Jul 11 2019, 5:01 AM.

Details

Summary

This adds a zero length array section mapping for each pointer captured by a lambda that is used in a target region, as per section 2.19.7.1 of the OpenMP 5 specification.

Diff Detail

Repository
rL LLVM

Event Timeline

DavidTruby created this revision.Jul 11 2019, 5:01 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 11 2019, 5:01 AM
ABataev added inline comments.Jul 11 2019, 5:22 AM
lib/CodeGen/CGOpenMPRuntime.cpp
8114 ↗(On Diff #209179)

I think you csn use EmitLValueForFieldInitialization just like gor the references and move the same code out of then-else branches because they use the same code. I mean, initialization of VarLVal variable can be moved out of the if-else.
Thise 2 functions produce the wame result for non-reference fields.

Moved common VarLVal initialisation out of the if/else statement

DavidTruby marked an inline comment as done.Jul 11 2019, 5:32 AM
This revision is now accepted and ready to land.Jul 11 2019, 5:34 AM

I don't have commit access so can't commit this myself, could you do it for me? Thanks

I don't have commit access so can't commit this myself, could you do it for me? Thanks

Sure, thanks for the patch!

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJul 11 2019, 6:54 AM