Commit Graph

11 Commits

Author SHA1 Message Date
Alexey Bataev a8a9153a37 [OPENMP] Support for -fopenmp-simd option with compilation of simd loops
only.

Added support for -fopenmp-simd option that allows compilation of
simd-based constructs without emission of OpenMP runtime calls.

llvm-svn: 321560
2017-12-29 18:07:07 +00:00
Diana Picus bec724cbb0 Revert "Revert r301742 which made ExprConstant checking apply to all full-exprs."
This reverts commit r305239 because it broke the buildbots (the
diag-flags.cpp test is failing).

llvm-svn: 305287
2017-06-13 12:50:06 +00:00
Nick Lewycky 54992386f3 Revert r301742 which made ExprConstant checking apply to all full-exprs.
This patch also exposed pre-existing bugs in clang, see PR32864 and PR33140#c3 .

llvm-svn: 305239
2017-06-12 21:59:18 +00:00
Nick Lewycky e7d6fbdfb7 Remove Sema::CheckForIntOverflow, and instead check all full-expressions.
CheckForIntOverflow used to implement a whitelist of top-level expressions to
send to the constant expression evaluator, which handled many more expressions
than the CheckForIntOverflow whitelist did.

llvm-svn: 301742
2017-04-29 09:33:46 +00:00
Richard Smith 5e9746f520 DR583, DR1512: Implement a rewrite to C++'s 'composite pointer type' rules.
This has two significant effects:

1) Direct relational comparisons between null pointer constants (0 and nullopt)
   and pointers are now ill-formed. This was always the case for C, and it
   appears that C++ only ever permitted by accident. For instance, cases like
     nullptr < &a
   are now rejected.

2) Comparisons and conditional operators between differently-cv-qualified
   pointer types now work, and produce a composite type that both source
   pointer types can convert to (when possible). For instance, comparison
   between 'int **' and 'const int **' is now valid, and uses an intermediate
   type of 'const int *const *'.

Clang previously supported #2 as an extension.

We do not accept the cases in #1 as an extension. I've tested a fair amount of
code to check that this doesn't break it, but if it turns out that someone is
relying on this, we can easily add it back as an extension.

This is a re-commit of r284800.

llvm-svn: 284890
2016-10-21 22:00:42 +00:00
Renato Golin 41189656ed Revert "DR583, DR1512: Implement a rewrite to C++'s 'composite pointer type' rules."
This reverts commit r284800, as it failed all ARM/AArch64 bots.

llvm-svn: 284811
2016-10-21 08:03:49 +00:00
Richard Smith 0c1c53e3fa DR583, DR1512: Implement a rewrite to C++'s 'composite pointer type' rules.
This has two significant effects:

1) Direct relational comparisons between null pointer constants (0 and nullopt)
   and pointers are now ill-formed. This was always the case for C, and it
   appears that C++ only ever permitted by accident. For instance, cases like
     nullptr < &a
   are now rejected.

2) Comparisons and conditional operators between differently-cv-qualified
   pointer types now work, and produce a composite type that both source
   pointer types can convert to (when possible). For instance, comparison
   between 'int **' and 'const int **' is now valid, and uses an intermediate
   type of 'const int *const *'.

Clang previously supported #2 as an extension.

We do not accept the cases in #1 as an extension. I've tested a fair amount of
code to check that this doesn't break it, but if it turns out that someone is
relying on this, we can easily add it back as an extension.

llvm-svn: 284800
2016-10-21 02:36:37 +00:00
Alexey Bataev c5970623e0 Revert "[OPENMP] Allow skip expression after comma in clauses with lists."
This reverts commit http://reviews.llvm.org/rL265003. After some
thoughts decided to emit errors here.

llvm-svn: 265119
2016-04-01 08:43:42 +00:00
Alexey Bataev 05968174c3 [OPENMP] Allow skip expression after comma in clauses with lists.
Compatibility fix for better compatibility with the existing software.

llvm-svn: 265003
2016-03-31 09:13:44 +00:00
Alexey Bataev 1efd166af6 [OPENMP 4.5] Allow data members in 'aligned' clause.
OpenMP 4.5 allows privatization of data members OpenMP clauses. Patch
adds support for data members in 'aligned' clause.

llvm-svn: 264715
2016-03-29 10:59:56 +00:00
Alexey Bataev 0a6ed84a0d [OPENMP 4.5] Parsing/sema support for 'omp taskloop simd' directive.
OpenMP 4.5 adds directive 'taskloop simd'. Patch adds parsing/sema analysis for 'taskloop simd' directive and its clauses.

llvm-svn: 254597
2015-12-03 09:40:15 +00:00