Commit Graph

6 Commits

Author SHA1 Message Date
Daniel Neilson 59b6576b0e Change memcpy/memove/memset to have dest and source alignment attributes (Step 1).
Summary:
  Upstream LLVM is changing the the prototypes of the @llvm.memcpy/memmove/memset
intrinsics. This change updates the Clang tests for this change.

  The @llvm.memcpy/memmove/memset intrinsics currently have an explicit argument
which is required to be a constant integer. It represents the alignment of the
dest (and source), and so must be the minimum of the actual alignment of the
two.

 This change removes the alignment argument in favour of placing the alignment
attribute on the source and destination pointers of the memory intrinsic call.

 For example, code which used to read:
   call void @llvm.memcpy.p0i8.p0i8.i32(i8* %dest, i8* %src, i32 100, i32 4, i1 false)
will now read
   call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %dest, i8* align 4 %src, i32 100, i1 false)

 At this time the source and destination alignments must be the same (Step 1).
Step 2 of the change, to be landed shortly, will relax that contraint and allow
the source and destination to have different alignments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@322964 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-19 17:12:54 +00:00
Alexey Bataev 68d230359a [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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321560 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-29 18:07:07 +00:00
Alexey Bataev a60bd62877 [OPENMP] Fix handling of clauses in clause parsing mode.
The compiler may generate incorrect code if we try to capture the
variable in clause parsing mode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@320590 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-13 15:28:44 +00:00
Carlo Bertolli 62a81dfaec Recommit of
[OpenMP] Initial implementation of code generation for pragma 'distribute parallel for' on host

https://reviews.llvm.org/D29508

This patch makes the following additions:

It abstracts away loop bound generation code from procedures associated with pragma 'for' and loops in general, in such a way that the same procedures can be used for 'distribute parallel for' without the need for a full re-implementation.
It implements code generation for 'distribute parallel for' and adds regression tests. It includes tests for clauses.
It is important to notice that most of the clauses are implemented as part of existing procedures. For instance, firstprivate is already implemented for 'distribute' and 'for' as separate pragmas. As the implementation of 'distribute parallel for' is based on the same procedures, then we automatically obtain implementation for such clauses without the need to add new code. However, this requires regression tests that verify correctness of produced code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301340 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-25 17:52:12 +00:00
Carlo Bertolli 033a0e463c Revert r301223
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301233 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-24 19:50:35 +00:00
Carlo Bertolli 43864bcdf2 [OpenMP] Initial implementation of code generation for pragma 'distribute parallel for' on host
https://reviews.llvm.org/D29508

This patch makes the following additions:

1. It abstracts away loop bound generation code from procedures associated with pragma 'for' and loops in general, in such a way that the same procedures can be used for 'distribute parallel for' without the need for a full re-implementation.
2. It implements code generation for 'distribute parallel for' and adds regression tests. It includes tests for clauses.

It is important to notice that most of the clauses are implemented as part of existing procedures. For instance, firstprivate is already implemented for 'distribute' and 'for' as separate pragmas. As the implementation of 'distribute parallel for' is based on the same procedures, then we automatically obtain implementation for such clauses without the need to add new code. However, this requires regression tests that verify correctness of produced code.

Looking forward to comments.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301223 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-24 19:26:11 +00:00