Page MenuHomePhabricator

[OPENMP]Do not capture base pointer by reference if it is used as a base for array-like reduction.
ClosedPublic

Authored by ABataev on Aug 5 2020, 8:51 AM.

Details

Summary

If the declaration is used in the reduction clause, it is captured by
reference by default. But if the declaration is a pointer and it is a
base for array-like reduction, this declaration can be captured by
value, since the pointee is reduced but not the original declaration.

Diff Detail

Event Timeline

ABataev created this revision.Aug 5 2020, 8:51 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 5 2020, 8:51 AM
ABataev requested review of this revision.Aug 5 2020, 8:51 AM
jdoerfert accepted this revision.Aug 16 2020, 10:56 AM

While we should be able to optimize this later in the pipeline soon, I guess we can do it early for now. LGTM

This revision is now accepted and ready to land.Aug 16 2020, 10:56 AM
This revision was landed with ongoing or failed builds.Aug 18 2020, 6:08 AM
This revision was automatically updated to reflect the committed changes.