[PATCH] [OPENMP] Codegen for 'num_threads' clause in 'parallel' directive

hfinkel at anl.gov hfinkel at anl.gov
Mon Sep 22 07:42:38 PDT 2014


================
Comment at: lib/Sema/SemaOpenMP.cpp:2592
@@ -2591,3 +2591,3 @@
   Expr *ValExpr = NumThreads;
   if (!NumThreads->isValueDependent() && !NumThreads->isTypeDependent() &&
       !NumThreads->isInstantiationDependent() &&
----------------
ABataev wrote:
> hfinkel wrote:
> > Do you need all of these checks, or is value-dependent enough?
> I think we need all of them, because num_threads argument is not a constant, but an expression.
I'm not sure; I think this is worth testing. A similar issue same up with the patches for the assume_aligned attribute, and it turned out that only the ValueDependent check was needed. Note that sizeof(T), for example, is value-dependent, not type-dependent.

http://reviews.llvm.org/D5145






More information about the cfe-commits mailing list