[llvm-branch-commits] [cfe-branch] r278677 - OpenCL release notes

2016-08-19 Thread Anastasia Stulova via llvm-branch-commits
Author: stulova
Date: Mon Aug 15 11:28:10 2016
New Revision: 278677

URL: http://llvm.org/viewvc/llvm-project?rev=278677&view=rev
Log:
OpenCL release notes


Modified:
cfe/branches/release_39/docs/ReleaseNotes.rst

Modified: cfe/branches/release_39/docs/ReleaseNotes.rst
URL: 
http://llvm.org/viewvc/llvm-project/cfe/branches/release_39/docs/ReleaseNotes.rst?rev=278677&r1=278676&r2=278677&view=diff
==
--- cfe/branches/release_39/docs/ReleaseNotes.rst (original)
+++ cfe/branches/release_39/docs/ReleaseNotes.rst Mon Aug 15 11:28:10 2016
@@ -191,7 +191,52 @@ Objective-C Language Changes in Clang
 OpenCL C Language Changes in Clang
 --
 
-...
+Clang now has support for all OpenCL 2.0 features.  In particular, the 
following
+features have been completed since the previous release:
+
+- Pipe builtin functions (s6.13.16.2-4).
+- Address space conversion functions ``to_{global/local/private}``.
+- ``nosvm`` attribute support.
+- Improved diagnostic and generation of Clang Blocks used in OpenCL kernel 
code.
+- ``opencl_unroll_hint`` pragma.
+
+Several miscellaneous improvements have been made:
+
+- Supported extensions are now part of the target representation to give 
correct
+  diagnostics  for unsupported target features during compilation. For example,
+  when compiling for a target that does not support the double precision
+  floating point extension, Clang will give an error when encountering the
+  ``cl_khr_fp64`` pragma. Several missing extensions were added covering up to
+  and including OpenCL 2.0.
+- Clang now comes with the OpenCL standard headers declaring builtin types and
+  functions up to and including OpenCL 2.0 in ``lib/Headers/opencl-c.h``. By
+  default, Clang will not include this header. It can be included either using
+  the regular ``-I`` directive or (if the default one
+  from installation is to be used) using the ``-finclude-default-header``
+  frontend flag.
+
+  Example:
+
+  .. code-block:: none
+
+echo "bool is_wg_uniform(int i){return 
get_enqueued_local_size(i)==get_local_size(i);}" > test.cl
+clang -cc1 -finclude-default-header -cl-std=CL2.0 test.cl
+
+  All builtin function declarations from OpenCL 2.0 will be automatically
+  visible in test.cl.
+- Image types have been improved with better diagnostics for access qualifiers.
+  Images with one access qualifier type cannot be used in declarations for
+  another type. Also qualifiers are now propagated from the frontend down to
+  libraries and backends.
+- Diagnostic improvements for OpenCL types, address spaces and vectors.
+- Half type literal support has been added. For example, ``1.0h`` represents a
+  floating point literal in half precision, i.e., the value ``0xH3C00``.
+- The Clang driver now accepts OpenCL compiler options ``-cl-*`` (following the
+  OpenCL Spec v1.1-1.2 s5.8). For example, the ``-cl-std=CL1.2`` option from 
the
+  spec enables compilation for OpenCL 1.2, or ``-cl-mad-enable`` will enable
+  fusing multiply-and-add operations.
+- Clang now uses function metadata instead of module metadata to propagate
+  information related to OpenCL kernels e.g. kernel argument information.
 
 OpenMP Support in Clang
 --


___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [cfe-branch] r278605 - Merge r278393 and r278395.

2016-08-19 Thread Ed Schouten via llvm-branch-commits
Author: ed
Date: Sat Aug 13 15:43:56 2016
New Revision: 278605

URL: http://llvm.org/viewvc/llvm-project?rev=278605&view=rev
Log:
Merge r278393 and r278395.

LLVM/Clang 3.8 is directly usable as a cross compiler for CloudABI/i686.
In 3.9rc1 there are a couple of regressions in the driver that cause it
to be less usable:

- PIE was enabled unconditionally, even though it's only available for
  x86-64 and aarch64.
- Some inline assembly fails to build, due to a shortage of registers,
  as frame pointers are not omitted.

Both these changes are fairly low risk (read: they don't affect other
targets), so go ahead and merge them into 3.9, so we can use an
unmodified compiler on all architectures.


Modified:
cfe/branches/release_39/   (props changed)
cfe/branches/release_39/lib/Driver/ToolChains.cpp
cfe/branches/release_39/lib/Driver/ToolChains.h
cfe/branches/release_39/lib/Driver/Tools.cpp
cfe/branches/release_39/test/Driver/cloudabi.c
cfe/branches/release_39/test/Driver/cloudabi.cpp
cfe/branches/release_39/test/Driver/frame-pointer-elim.c

Propchange: cfe/branches/release_39/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Aug 13 15:43:56 2016
@@ -1,4 +1,4 @@
 /cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:275880,275967,276102,276350,276361,276473,276653,276716,276887,276891,276900,276979,276983,277095,277138,277141,277221,277307,277522,277743,277796-277797,277866,277889,277900,278139,278234-278235
+/cfe/trunk:275880,275967,276102,276350,276361,276473,276653,276716,276887,276891,276900,276979,276983,277095,277138,277141,277221,277307,277522,277743,277796-277797,277866,277889,277900,278139,278234-278235,278393,278395
 /cfe/trunk/test:170344
 /cfe/trunk/test/SemaTemplate:126920

Modified: cfe/branches/release_39/lib/Driver/ToolChains.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/branches/release_39/lib/Driver/ToolChains.cpp?rev=278605&r1=278604&r2=278605&view=diff
==
--- cfe/branches/release_39/lib/Driver/ToolChains.cpp (original)
+++ cfe/branches/release_39/lib/Driver/ToolChains.cpp Sat Aug 13 15:43:56 2016
@@ -3281,6 +3281,19 @@ Tool *CloudABI::buildLinker() const {
   return new tools::cloudabi::Linker(*this);
 }
 
+bool CloudABI::isPIEDefault() const {
+  // Only enable PIE on architectures that support PC-relative
+  // addressing. PC-relative addressing is required, as the process
+  // startup code must be able to relocate itself.
+  switch (getTriple().getArch()) {
+  case llvm::Triple::aarch64:
+  case llvm::Triple::x86_64:
+return true;
+  default:
+return false;
+  }
+}
+
 SanitizerMask CloudABI::getSupportedSanitizers() const {
   SanitizerMask Res = ToolChain::getSupportedSanitizers();
   Res |= SanitizerKind::SafeStack;

Modified: cfe/branches/release_39/lib/Driver/ToolChains.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/branches/release_39/lib/Driver/ToolChains.h?rev=278605&r1=278604&r2=278605&view=diff
==
--- cfe/branches/release_39/lib/Driver/ToolChains.h (original)
+++ cfe/branches/release_39/lib/Driver/ToolChains.h Sat Aug 13 15:43:56 2016
@@ -634,8 +634,7 @@ public:
   void AddCXXStdlibLibArgs(const llvm::opt::ArgList &Args,
llvm::opt::ArgStringList &CmdArgs) const override;
 
-  bool isPIEDefault() const override { return true; }
-
+  bool isPIEDefault() const override;
   SanitizerMask getSupportedSanitizers() const override;
   SanitizerMask getDefaultSanitizers() const override;
 

Modified: cfe/branches/release_39/lib/Driver/Tools.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/branches/release_39/lib/Driver/Tools.cpp?rev=278605&r1=278604&r2=278605&view=diff
==
--- cfe/branches/release_39/lib/Driver/Tools.cpp (original)
+++ cfe/branches/release_39/lib/Driver/Tools.cpp Sat Aug 13 15:43:56 2016
@@ -3258,7 +3258,7 @@ static bool shouldUseFramePointerForTarg
 break;
   }
 
-  if (Triple.isOSLinux()) {
+  if (Triple.isOSLinux() || Triple.getOS() == llvm::Triple::CloudABI) {
 switch (Triple.getArch()) {
 // Don't use a frame pointer on linux if optimizing for certain targets.
 case llvm::Triple::mips64:
@@ -7458,11 +7458,13 @@ void cloudabi::Linker::ConstructJob(Comp
 
   // CloudABI only supports static linkage.
   CmdArgs.push_back("-Bstatic");
-
-  // CloudABI uses Position Independent Executables exclusively.
-  CmdArgs.push_back("-pie");
   CmdArgs.push_back("--no-dynamic-linker");
-  CmdArgs.push_back("-zrelro");
+
+  // Provide PIE linker flags in case PIE is default for the architecture.
+  if (ToolChain.isPIEDefault()) {
+CmdArgs.push_back("-pie");
+CmdArgs.push_back("-zrelro");
+  }
 
   CmdArgs.push_back("--eh-frame-hdr");
   CmdArgs.push_back("--gc-sections");

Modified

[llvm-branch-commits] [cfe-branch] r279083 - Removed extra space in OpenCL release notes

2016-08-19 Thread Anastasia Stulova via llvm-branch-commits
Author: stulova
Date: Thu Aug 18 11:17:20 2016
New Revision: 279083

URL: http://llvm.org/viewvc/llvm-project?rev=279083&view=rev
Log:
Removed extra space in OpenCL release notes


Modified:
cfe/branches/release_39/docs/ReleaseNotes.rst

Modified: cfe/branches/release_39/docs/ReleaseNotes.rst
URL: 
http://llvm.org/viewvc/llvm-project/cfe/branches/release_39/docs/ReleaseNotes.rst?rev=279083&r1=279082&r2=279083&view=diff
==
--- cfe/branches/release_39/docs/ReleaseNotes.rst (original)
+++ cfe/branches/release_39/docs/ReleaseNotes.rst Thu Aug 18 11:17:20 2016
@@ -207,7 +207,7 @@ features have been completed since the p
 Several miscellaneous improvements have been made:
 
 - Supported extensions are now part of the target representation to give 
correct
-  diagnostics  for unsupported target features during compilation. For example,
+  diagnostics for unsupported target features during compilation. For example,
   when compiling for a target that does not support the double precision
   floating point extension, Clang will give an error when encountering the
   ``cl_khr_fp64`` pragma. Several missing extensions were added covering up to


___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [cfe-branch] r278771 - [Branch 3.9] Remove any traces of partial constexpr lambda implementation

2016-08-19 Thread Faisal Vali via llvm-branch-commits
Author: faisalv
Date: Mon Aug 15 21:11:53 2016
New Revision: 278771

URL: http://llvm.org/viewvc/llvm-project?rev=278771&view=rev
Log:
[Branch 3.9] Remove any traces of partial constexpr lambda implementation 

This patch essentially reverses all the changes from the following commit: 
https://reviews.llvm.org/rL264513 for branch 3.9.

Requested by Richard and Approved by Hans here: https://reviews.llvm.org/D23485



Removed:
cfe/branches/release_39/test/Parser/cxx1z-constexpr-lambdas.cpp
cfe/branches/release_39/test/SemaCXX/cxx1z-constexpr-lambdas.cpp
Modified:
cfe/branches/release_39/include/clang/Basic/DiagnosticASTKinds.td
cfe/branches/release_39/include/clang/Basic/DiagnosticParseKinds.td
cfe/branches/release_39/include/clang/Sema/Sema.h
cfe/branches/release_39/lib/AST/ExprConstant.cpp
cfe/branches/release_39/lib/Parse/ParseExprCXX.cpp
cfe/branches/release_39/lib/Sema/SemaLambda.cpp
cfe/branches/release_39/lib/Sema/TreeTransform.h

Modified: cfe/branches/release_39/include/clang/Basic/DiagnosticASTKinds.td
URL: 
http://llvm.org/viewvc/llvm-project/cfe/branches/release_39/include/clang/Basic/DiagnosticASTKinds.td?rev=278771&r1=278770&r2=278771&view=diff
==
--- cfe/branches/release_39/include/clang/Basic/DiagnosticASTKinds.td (original)
+++ cfe/branches/release_39/include/clang/Basic/DiagnosticASTKinds.td Mon Aug 
15 21:11:53 2016
@@ -158,12 +158,6 @@ def warn_integer_constant_overflow : War
   "overflow in expression; result is %0 with type %1">,
   InGroup>;
 
-// This is a temporary diagnostic, and shall be removed once our 
-// implementation is complete, and like the preceding constexpr notes belongs
-// in Sema.
-def note_unimplemented_constexpr_lambda_feature_ast : Note<
-"unimplemented constexpr lambda feature: %0 (coming soon!)">;
-
 // inline asm related.
 let CategoryName = "Inline Assembly Issue" in {
   def err_asm_invalid_escape : Error<

Modified: cfe/branches/release_39/include/clang/Basic/DiagnosticParseKinds.td
URL: 
http://llvm.org/viewvc/llvm-project/cfe/branches/release_39/include/clang/Basic/DiagnosticParseKinds.td?rev=278771&r1=278770&r2=278771&view=diff
==
--- cfe/branches/release_39/include/clang/Basic/DiagnosticParseKinds.td 
(original)
+++ cfe/branches/release_39/include/clang/Basic/DiagnosticParseKinds.td Mon Aug 
15 21:11:53 2016
@@ -780,20 +780,11 @@ def warn_cxx98_compat_lambda : Warning<
   InGroup, DefaultIgnore;
 def err_lambda_missing_parens : Error<
   "lambda requires '()' before %select{'mutable'|return type|"
-  "attribute specifier|'constexpr'}0">;
-def err_lambda_decl_specifier_repeated : Error<
-  "%select{'mutable'|'constexpr'}0 cannot appear multiple times in a lambda 
declarator">;
+  "attribute specifier}0">;
 // C++1z lambda expressions
 def err_expected_star_this_capture : Error<
   "expected 'this' following '*' in lambda capture list">;
 
-// C++1z constexpr lambda expressions
-def warn_cxx14_compat_constexpr_on_lambda : Warning<
-  "constexpr on lambda expressions is incompatible with C++ standards before 
C++1z">,
-  InGroup, DefaultIgnore;
-def ext_constexpr_on_lambda_cxx1z : ExtWarn<
-  "'constexpr' on lambda expressions is a C++1z extension">, InGroup;
-
 // Availability attribute
 def err_expected_version : Error<
   "expected a version of the form 'major[.minor[.subminor]]'">;

Modified: cfe/branches/release_39/include/clang/Sema/Sema.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/branches/release_39/include/clang/Sema/Sema.h?rev=278771&r1=278770&r2=278771&view=diff
==
--- cfe/branches/release_39/include/clang/Sema/Sema.h (original)
+++ cfe/branches/release_39/include/clang/Sema/Sema.h Mon Aug 15 21:11:53 2016
@@ -5111,8 +5111,7 @@ public:
SourceRange IntroducerRange,
TypeSourceInfo *MethodType,
SourceLocation EndLoc,
-   ArrayRef Params, 
-   bool IsConstexprSpecified);
+   ArrayRef Params);
 
   /// \brief Endow the lambda scope info with the relevant properties.
   void buildLambdaScope(sema::LambdaScopeInfo *LSI, 

Modified: cfe/branches/release_39/lib/AST/ExprConstant.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/branches/release_39/lib/AST/ExprConstant.cpp?rev=278771&r1=278770&r2=278771&view=diff
==
--- cfe/branches/release_39/lib/AST/ExprConstant.cpp (original)
+++ cfe/branches/release_39/lib/AST/ExprConstant.cpp Mon Aug 15 21:11:53 2016
@@ -36,7 +36,6 @@
 #include "clang/AST/APValue.h"
 #include "clang/AST/ASTContext.h"
 #include "clang/AST/ASTDiagnostic.h"
-#include "clang

[llvm-branch-commits] [cfe-branch] r279224 - Minor change to OpenCL release notes to add one missing item.

2016-08-19 Thread Anastasia Stulova via llvm-branch-commits
Author: stulova
Date: Fri Aug 19 04:19:36 2016
New Revision: 279224

URL: http://llvm.org/viewvc/llvm-project?rev=279224&view=rev
Log:
Minor change to OpenCL release notes to add one missing item.


Modified:
cfe/branches/release_39/docs/ReleaseNotes.rst

Modified: cfe/branches/release_39/docs/ReleaseNotes.rst
URL: 
http://llvm.org/viewvc/llvm-project/cfe/branches/release_39/docs/ReleaseNotes.rst?rev=279224&r1=279223&r2=279224&view=diff
==
--- cfe/branches/release_39/docs/ReleaseNotes.rst (original)
+++ cfe/branches/release_39/docs/ReleaseNotes.rst Fri Aug 19 04:19:36 2016
@@ -163,6 +163,8 @@ Clang now has support for all OpenCL 2.0
 features have been completed since the previous release:
 
 - Pipe builtin functions (s6.13.16.2-4).
+- Dynamic parallelism support via the ``enqueue_kernel`` Clang builtin 
function,
+  as well as the kernel query functions from s6.13.17.6. 
 - Address space conversion functions ``to_{global/local/private}``.
 - ``nosvm`` attribute support.
 - Improved diagnostic and generation of Clang Blocks used in OpenCL kernel 
code.


___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits