This is an archive of the discontinued LLVM Phabricator instance.

[OPENMP] allow static local variable on data-sharing attribute clause
ClosedPublic

Authored by kkwli0 on Jul 29 2015, 6:23 PM.

Details

Summary

This patch is to fix the problem of specifying static local variables on the data-sharing attribute clause. Currently, clang flags it as errors.

int main() {
 static int x; 
  int i; 
#pragma omp parallel for reduction(+:x) 
  for (i=0; i<10; i++) { 
    x = 1; 
  } 
}

Diff Detail

Event Timeline

kkwli0 updated this revision to Diff 30977.Jul 29 2015, 6:23 PM
kkwli0 retitled this revision from to [OPENMP] allow static local variable on data-sharing attribute clause.
kkwli0 updated this object.
kkwli0 added a subscriber: cfe-commits.
kkwli0 updated this revision to Diff 31171.Jul 31 2015, 2:51 PM
kkwli0 edited edge metadata.

Updated unit tests.

Codegen test? Also for variables, used in chain of different constructs like OpenMP pragmas, blocks, lambdas.

kkwli0 updated this revision to Diff 34001.Sep 3 2015, 6:02 PM
kkwli0 updated this object.

Update codegen test cases.

ABataev accepted this revision.Sep 3 2015, 8:09 PM
ABataev edited edge metadata.
This revision is now accepted and ready to land.Sep 3 2015, 8:09 PM
kkwli0 updated this revision to Diff 34097.Sep 4 2015, 6:17 PM
kkwli0 edited edge metadata.

No code change other than resolving merge conflict with trunk.

Committed revision 247715.

sfantao closed this revision.Sep 15 2015, 2:32 PM