This is an archive of the discontinued LLVM Phabricator instance.

[OPENMP] Allow to use global variables as lcv in loop-based directives.
ClosedPublic

Authored by ABataev on Apr 29 2015, 3:16 AM.

Details

Summary

For proper codegen we need to capture variable in the OpenMP region. In loop-based directives loop control variables are private by default and they must be captured in this region. There was a problem with capturing of globals, used as lcv, as they was not marked as private by default.

Diff Detail

Repository
rL LLVM

Event Timeline

ABataev updated this revision to Diff 24606.Apr 29 2015, 3:16 AM
ABataev retitled this revision from to [OPENMP] Allow to use global variables as lcv in loop-based directives..
ABataev updated this object.
ABataev edited the test plan for this revision. (Show Details)
ABataev added reviewers: rjmccall, rsmith, hfinkel.
ABataev added subscribers: fraggamuffin, ejstotzer, Unknown Object (MLST).
rsmith added inline comments.Apr 29 2015, 10:49 AM
include/clang/Sema/Sema.h
7427 ↗(On Diff #24606)

Grammar error around "if it so"

7428 ↗(On Diff #24606)

Use \p, not \a, for references to function parameters.

lib/Sema/SemaOpenMP.cpp
2476–2482 ↗(On Diff #24606)

Please just pass a flag into CheckInit to tell it not to produce diagnostics rather than disabling the diagnostics engine.

This revision was automatically updated to reflect the committed changes.