r204135 - [OPENMP] Simplified data-sharing attributes analysis.

Alexey Bataev a.bataev at hotmail.com
Tue Mar 18 03:23:46 PDT 2014


Author: abataev
Date: Tue Mar 18 05:23:46 2014
New Revision: 204135

URL: http://llvm.org/viewvc/llvm-project?rev=204135&view=rev
Log:
[OPENMP] Simplified data-sharing attributes analysis.

Modified:
    cfe/trunk/lib/Sema/SemaOpenMP.cpp

Modified: cfe/trunk/lib/Sema/SemaOpenMP.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaOpenMP.cpp?rev=204135&r1=204134&r2=204135&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaOpenMP.cpp (original)
+++ cfe/trunk/lib/Sema/SemaOpenMP.cpp Tue Mar 18 05:23:46 2014
@@ -134,22 +134,7 @@ DSAStackTy::DSAVarData DSAStackTy::getDS
                                           VarDecl *D) {
   DSAVarData DVar;
   if (Iter == Stack.rend() - 1) {
-    // OpenMP [2.9.1.1, Data-sharing Attribute Rules for Variables Referenced
-    // in a region but not in construct]
-    //  File-scope or namespace-scope variables referenced in called routines
-    //  in the region are shared unless they appear in a threadprivate
-    //  directive.
-    // TODO
-    if (!D->isFunctionOrMethodVarDecl())
-      DVar.CKind = OMPC_shared;
-
-    // OpenMP [2.9.1.2, Data-sharing Attribute Rules for Variables Referenced
-    // in a region but not in construct]
-    //  Variables with static storage duration that are declared in called
-    //  routines in the region are shared.
-    if (D->hasGlobalStorage())
-      DVar.CKind = OMPC_shared;
-
+    DVar.CKind = OMPC_shared;
     return DVar;
   }
 





More information about the cfe-commits mailing list