| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Treat 'f()' as 'f(void)' rather than a function w/o a prototype.
Reviewers: Anastasia, yaxunl
Reviewed By: Anastasia, yaxunl
Subscribers: cfe-commits, echuraev, chapuni
Differential Revision: https://reviews.llvm.org/D33681
Re-apply revision 306653.
llvm-svn: 315453
|
|
|
|
|
|
| |
Remove OpenCL special case.
llvm-svn: 314872
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently clang allows the following code
int a;
int b = (const int) a;
However it does not the following code
int4 a;
int4 b = (const int4) a;
This is because Clang compares the qualified types instead of unqualified types for vector type casting, which causes the inconsistency.
This patch fixes that.
Differential Revision: https://reviews.llvm.org/D38463
llvm-svn: 314802
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Block captures can have different physical locations
in memory segments depending on the use case (as a function
call or as a kernel enqueue) and in different vendor
implementations.
Therefore it's unclear how to add address space to capture
addresses uniformly. Currently it has been decided to disallow
taking addresses of captured variables until further
clarifications in the spec.
Differential Revision: https://reviews.llvm.org/D36410
llvm-svn: 312728
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D36676
llvm-svn: 310927
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D36580
llvm-svn: 310924
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
OpenCL 2.0 atomic builtin functions have a scope argument which is ideally
represented as synchronization scope argument in LLVM atomic instructions.
Clang supports translating Clang atomic builtin functions to LLVM atomic
instructions. However it currently does not support synchronization scope
of LLVM atomic instructions. Without this, users have to use LLVM assembly
code to implement OpenCL atomic builtin functions.
This patch adds OpenCL 2.0 atomic builtin functions as Clang builtin
functions, which supports generating LLVM atomic instructions with
synchronization scope operand.
Currently only constant memory scope argument is supported. Support of
non-constant memory scope argument will be added later.
Differential Revision: https://reviews.llvm.org/D28691
llvm-svn: 310082
|
|
|
|
|
|
|
| |
This adds get_kernel_max_sub_group_size_for_ndrange and
get_kernel_sub_group_count_for_ndrange.
llvm-svn: 309678
|
|
|
|
|
|
|
| |
This fixes the test, so that it can be run on different hosts that may have
different OpenCL extensions enabled.
llvm-svn: 309571
|
|
|
|
|
|
| |
Check the subgroup extension is enabled, before doing other Sema checks.
llvm-svn: 309567
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
a function argument.
Reviewers: Anastasia
Reviewed By: Anastasia
Subscribers: yaxunl, cfe-commits, bader
Differential Revision: https://reviews.llvm.org/D34980
llvm-svn: 307238
|
|
|
|
|
|
|
|
|
| |
Rename err_opencl_enqueue_kernel_expected_type so that other builtins
can use the same diagnostic.
https://reviews.llvm.org/D34948
llvm-svn: 307067
|
|
|
|
|
|
| |
Slightly improve the diagnostic by including the function name.
llvm-svn: 306827
|
|
|
|
|
|
| |
It broke bots.
llvm-svn: 306660
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
does it make sense to enable K&R function declaration style for OpenCL?
clang throws following error message for the declaration w/o arguments:
```
int my_func();
error: function with no prototype cannot use the spir_function calling convention
```
Current way to fix this issue is to specify that parameter list is empty by using 'void':
```
int my_func(void);
```
Let me know what do you think about this patch.
Reviewers: Anastasia, yaxunl
Reviewed By: Anastasia
Subscribers: cfe-commits, echuraev
Differential Revision: https://reviews.llvm.org/D33681
llvm-svn: 306653
|
|
|
|
|
|
|
|
|
|
|
|
| |
Produce an error if variables qualified with a local or
a constant address space are not declared in the outermost
scope of a kernel.
Patch by Simon Perretta.
Differential Revision: https://reviews.llvm.org/D34024
llvm-svn: 305798
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Improve OpenCL type checking by rejecting function pointer types.
Reviewers: Anastasia, yaxunl
Reviewed By: Anastasia
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D33821
llvm-svn: 304575
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: Anastasia, cfe-commits
Reviewed By: Anastasia
Subscribers: bader, yaxunl
Differential Revision: https://reviews.llvm.org/D31745
llvm-svn: 304193
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the type of the vector element
Summary:
This is the fix for patch https://reviews.llvm.org/D33353
@uweigand, could you please verify that everything will be good on SystemZ?
I added triple spir-unknown-unknown.
Thank you in advance!
Reviewers: uweigand
Reviewed By: uweigand
Subscribers: yaxunl, cfe-commits, bader, Anastasia, uweigand
Differential Revision: https://reviews.llvm.org/D33648
llvm-svn: 304191
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
than the type of the vector element"
This reverts commit r303986 as it broke all ARM and AArch64 buildbots...
http://lab.llvm.org:8011/builders/clang-cmake-aarch64-39vma/builds/7007
http://lab.llvm.org:8011/builders/clang-cmake-aarch64-quick/builds/6705
http://lab.llvm.org:8011/builders/clang-cmake-armv7-a15/builds/7509
etc.
llvm-svn: 303996
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the type of the vector element
Reviewers: Anastasia
Reviewed By: Anastasia
Subscribers: cfe-commits, bader, yaxunl
Differential Revision: https://reviews.llvm.org/D33353
llvm-svn: 303986
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: Anastasia
Reviewed By: Anastasia
Subscribers: yaxunl, cfe-commits, bader
Differential Revision: https://reviews.llvm.org/D33483
llvm-svn: 303846
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: This patch increases code coverage.
Reviewers: Anastasia
Reviewed By: Anastasia
Subscribers: cfe-commits, bader, yaxunl
Differential Revision: https://reviews.llvm.org/D33489
llvm-svn: 303844
|
|
|
|
|
|
|
|
|
|
|
| |
Alloca always returns a pointer in alloca address space, which may
be different from the type defined by the language. For example,
in C++ the auto variables are in the default address space. Therefore
cast alloca to the expected address space when necessary.
Differential Revision: https://reviews.llvm.org/D32248
llvm-svn: 303370
|
|
|
|
|
|
|
|
| |
variable
Differential Revision: https://reviews.llvm.org/D32977
llvm-svn: 303072
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: Anastasia, cfe-commits
Reviewed By: Anastasia
Subscribers: bader, yaxunl
Differential Revision: https://reviews.llvm.org/D32898
llvm-svn: 302633
|
|
|
|
|
|
|
|
| |
Patch by Simon Perretta.
Differential Revision: https://reviews.llvm.org/D32856
llvm-svn: 302411
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Add intel_reqd_sub_group_size attribute support as intel extension cl_intel_required_subgroup_size from
https://www.khronos.org/registry/OpenCL/extensions/intel/cl_intel_required_subgroup_size.txt
Reviewers: Anastasia, bader, hfinkel, pxli168
Reviewed By: Anastasia, bader, pxli168
Subscribers: cfe-commits, yaxunl
Differential Revision: https://reviews.llvm.org/D30805
llvm-svn: 302125
|
|
|
|
|
|
|
|
|
|
|
| |
Check unqualified type for ndrange argument in device_side_enqueue so
device_side_enqueue accept const and volatile qualified ndranges.
Differential Revision: https://reviews.llvm.org/D31458
Patch by Dmitry Borisenkov!
llvm-svn: 300988
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For OpenCL, the private address space qualifier is 0 in AST. Before this change, 0 address space qualifier
is always mapped to target address space 0. As now target private address space is specified by
alloca address space in data layout, address space qualifier 0 needs to be mapped to alloca addr space specified by the data layout.
This change has no impact on targets whose alloca addr space is 0.
With contributions from Matt Arsenault, Tony Tye and Wen-Heng (Jack) Chung
Differential Revision: https://reviews.llvm.org/D31404
llvm-svn: 299965
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
I saw the same changes in the following review: https://reviews.llvm.org/D17438
I don't know in that way I could determine that atomic variable was initialized by macro ATOMIC_VAR_INIT. Anyway I added check that atomic variables can be initialize only in global scope.
I think that we can discuss this change.
Reviewers: Anastasia, cfe-commits
Reviewed By: Anastasia
Subscribers: bader, yaxunl
Differential Revision: https://reviews.llvm.org/D30643
llvm-svn: 299537
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: Anastasia, cfe-commits
Reviewed By: Anastasia
Subscribers: yaxunl, bader
Differential Revision: https://reviews.llvm.org/D31594
llvm-svn: 299524
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixed the assertion due to absence of source location for
implicitly defined types (using addImplicitTypedef()).
During Sema checks the source location is being expected
and therefore an assertion is triggered.
The change is not specific to OpenCL. But it is particularly
common for OpenCL types to be declared implicitly in Clang
to support the mode without the standard header.
Differential Revision: https://reviews.llvm.org/D31397
llvm-svn: 299447
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: Anastasia, cfe-commits
Reviewed By: Anastasia
Subscribers: bader, yaxunl
Differential Revision: https://reviews.llvm.org/D30937
llvm-svn: 298369
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
vector data type in OpenCL
Summary: I added a new rank to ImplicitConversionRank enum to resolve the function overload ambiguity with vector types. Rank of scalar types conversion is lower than vector splat. So, we can choose which function should we call. See test for more details.
Reviewers: Anastasia, cfe-commits
Reviewed By: Anastasia
Subscribers: bader, yaxunl
Differential Revision: https://reviews.llvm.org/D30816
llvm-svn: 298366
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: Anastasia
Reviewed By: Anastasia
Subscribers: cfe-commits, yaxunl, bader
Differential Revision: https://reviews.llvm.org/D28136
llvm-svn: 297947
|
|
|
|
|
|
| |
to specify triple=x86_64-unknown.
llvm-svn: 297530
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Reimplemented conditional operator so that it checks
compatibility of unqualified pointees of the 2nd and
the 3rd operands (C99, OpenCL v2.0 6.5.15).
Define QualTypes compatibility for OpenCL as following:
- corresponding types are compatible (C99 6.7.3)
- CVR-qualifiers are equal (C99 6.7.3)
- address spaces are equal (implementation defined)
2. Added generic address space to Itanium mangling.
Review: D30037
Patch by Dmitry Borisenkov!
llvm-svn: 297468
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D30551
llvm-svn: 297436
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D30366
llvm-svn: 296241
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D30359
llvm-svn: 296239
|
|
|
|
| |
llvm-svn: 295874
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Removed ndrange_t as Clang builtin type and added
as a struct type in the OpenCL header.
Use type name to do the Sema checking in enqueue_kernel
and modify IR generation accordingly.
Review: D28058
Patch by Dmitry Borisenkov!
llvm-svn: 295311
|
|
|
|
| |
llvm-svn: 295307
|
|
|
|
|
|
|
|
|
| |
Fix for bug 30217 - incorrect error given for logical
NOT operation with a pointer type: corrected sema check
and improved related tests.
Review: D29038
llvm-svn: 294313
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Modify ObjC blocks impl wrt address spaces as follows:
- keep default private address space for blocks generated
as local variables (with captures);
- add global address space for global block literals (no captures);
- make the block invoke function and enqueue_kernel prototype with
the generic AS block pointer parameter to accommodate both
private and global AS cases from above;
- add block handling into default AS because it's implemented as
a special pointer type (BlockPointer) in the frontend and therefore
it is used as a pointer everywhere. This is also needed to accommodate
both private and global AS blocks for the two cases above.
- removes ObjC RT specific symbols (NSConcreteStackBlock and
NSConcreteGlobalBlock) in the OpenCL mode.
Review: https://reviews.llvm.org/D28814
llvm-svn: 293286
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Prior to OpenCL 2.0, image3d_t can only be used with the write_only
access qualifier when the cl_khr_3d_image_writes extension is enabled,
see e.g. OpenCL 1.1 s6.8b.
Require the extension for write_only image3d_t types and guard uses of
write_only image3d_t in the OpenCL header.
Patch by Sven van Haastregt!
Review: https://reviews.llvm.org/D28860
llvm-svn: 293050
|
|
|
|
|
|
|
| |
- Removed duplicated word typo.
- Made coherent across multiple similar diagnostics.
llvm-svn: 292804
|
|
|
|
| |
llvm-svn: 292636
|
|
|
|
|
|
|
|
| |
disabling all extensions using pragma
Differential Revision: https://reviews.llvm.org/D28257
llvm-svn: 291243
|