This is an archive of the discontinued LLVM Phabricator instance.

[OPENMP]Fix PR46146: Do not consider globalized variables as NRVO candidates.
ClosedPublic

Authored by ABataev on Jun 1 2020, 9:59 AM.

Details

Summary

If the variables must be globalized in OpenMP mode (local automatic
variable, GPU compilation mode, the variable may escape its declaration
context by the reference or by the pointer), it should not be considered
as the NRVO candidate. Otherwise, incorrect the return value of the
function might not be updated.

Diff Detail

Event Timeline

ABataev created this revision.Jun 1 2020, 9:59 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 1 2020, 9:59 AM
jdoerfert accepted this revision.Jun 3 2020, 12:11 PM

LGTM, thx!

This revision is now accepted and ready to land.Jun 3 2020, 12:11 PM
This revision was automatically updated to reflect the committed changes.