olestrohm updated this revision to Diff 373225.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109609/new/
https://reviews.llvm.org/D109609
Files:
clang/include/clang/AST/DeclCXX.h
clang/include/clang/Sema/Sema.h
clang/lib/AST/DeclCXX.cpp
clang/lib/Sema/SemaDeclCXX.cpp
clang/lib
olestrohm marked 2 inline comments as done.
olestrohm added inline comments.
Comment at: clang/lib/Sema/SemaLookup.cpp:3082
ID.AddInteger(VolatileThis);
+ ID.AddInteger((unsigned)AS);
Anastasia wrote:
> Btw ctors and assignments don't seem to need this but
olestrohm updated this revision to Diff 373218.
olestrohm added a comment.
I made the implicit destructor always be created in __generic address space.
I couldn't manage to properly figure a case that would trigger
`LookupSpecialMember`,
so I couldn't figure out how or if address spaces are hand
This revision was automatically updated to reflect the committed changes.
Closed by commit rG8008009fd25b: [OpenCL] Initialize temporaries in the private
address space (authored by olestrohm).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107553/new/
olestrohm created this revision.
olestrohm added reviewers: Anastasia, svenvh, rjmccall.
olestrohm added a project: clang.
Herald added subscribers: ldrumm, yaxunl.
olestrohm requested review of this revision.
Herald added a subscriber: cfe-commits.
This patch aims to add initial support for multi
olestrohm accepted this revision.
olestrohm added a comment.
This revision is now accepted and ready to land.
Looks good!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109526/new/
https://reviews.llvm.org/D109526
___
cfe-commits mailing list
olestrohm updated this revision to Diff 367455.
olestrohm added a comment.
I made the check into an assert as suggested.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107553/new/
https://reviews.llvm.org/D107553
Files:
clang/include/clang/Sema/Initialization.h
clang/lib/Sema/SemaEx
olestrohm created this revision.
olestrohm added reviewers: Anastasia, rjmccall.
olestrohm added a project: clang.
Herald added subscribers: ldrumm, yaxunl.
olestrohm requested review of this revision.
Herald added a subscriber: cfe-commits.
This patch fixes initializing temporaries, which are cur
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG85255a04e572: [C++][Sema] Ignore top-level qualifiers in
casts (authored by olestrohm).
Changed prior to commit:
https://reviews.llvm.org/D102689?
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG78d309ce197c: [OpenCL] Fix qualifiers check on binding
references to temporaries (authored by olestrohm).
Repository:
rG LLVM Github Monorepo
CHA
This revision was automatically updated to reflect the committed changes.
Closed by commit rGb102e6880ab0: [OpenCL] Fix overloading resolution of
addrspace constructors (authored by olestrohm).
Changed prior to commit:
https://reviews.llvm.org/D102850?vs=351165&id=351388#toc
Repository:
rG L
olestrohm updated this revision to Diff 351165.
olestrohm added a comment.
Added a comment explaining what the check is meant for.
Also added a `CHECK-NOT: used` to properly test that the __generic constructor
is not used.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102850/new/
http
olestrohm added inline comments.
Comment at: clang/test/AST/ast-dump-implicit-members.clcpp:10
+
+// CHECK: CXXConstructorDecl {{.*}} implicit used constexpr S 'void ()
__generic noexcept'
+// CHECK: CXXConstructorDecl {{.*}} implicit constexpr S 'void (const
__generic S &) __g
olestrohm created this revision.
olestrohm added reviewers: Anastasia, svenvh.
olestrohm added a project: clang.
Herald added subscribers: ldrumm, yaxunl.
olestrohm requested review of this revision.
Herald added a subscriber: cfe-commits.
Fixing the qualifiers check from PR49733.
It would be gre
olestrohm added inline comments.
Comment at: clang/test/SemaCXX/warn-reinterpret-base-class.cpp:301
- // expected-warning@+2 {{'reinterpret_cast' to class 'L' (aka 'const F
*volatile') from its base at non-zero offset 'E *' behaves differently from
'static_cast'}}
+ // expe
olestrohm updated this revision to Diff 350561.
olestrohm added a comment.
I've reverted to using Constructors and prioritizing based on which constructor
is the most qualified.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102850/new/
https://reviews.llvm.org/D102850
Files:
clang/l
olestrohm updated this revision to Diff 350560.
olestrohm retitled this revision from "[C++4OpenCL] Allow address space
conversion in reinterpret_cast" to "[C++] Ignore top-level qualifiers in casts".
olestrohm edited the summary of this revision.
olestrohm added a comment.
I've added a check in
This revision was automatically updated to reflect the committed changes.
Closed by commit rG438cf5577e72: [OpenCL] Fix missing addrspace on implicit
move assignment operator (authored by olestrohm).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D1032
olestrohm updated this revision to Diff 348969.
olestrohm added a comment.
Cleaned up the test by renaming the struct and making the test compile.
The test has also been moved to `clang/test/AST` as suggested, since it really
just makes sure that the generated AST contains the correct implicit me
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG94b0aec0f5c6: [OpenCL] Fix ICE with invalid use of half
(authored by olestrohm).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
olestrohm added inline comments.
Comment at: clang/lib/Sema/SemaCast.cpp:2359
- if (SrcType == DestType) {
+ if (SrcType == Self.Context.removeAddrSpaceQualType(DestType)) {
// C++ 5.2.10p2 has a note that mentions that, subject to all other
rjmccall wro
olestrohm created this revision.
olestrohm added reviewers: Anastasia, svenvh.
olestrohm added a project: clang.
Herald added subscribers: ldrumm, yaxunl.
olestrohm requested review of this revision.
Herald added a subscriber: cfe-commits.
This fixes the missing address space on `this` in the impl
olestrohm created this revision.
olestrohm added reviewers: Anastasia, svenvh.
olestrohm added a project: clang.
Herald added subscribers: ldrumm, yaxunl.
olestrohm requested review of this revision.
Herald added a subscriber: cfe-commits.
Because half is limited to the `cl_khr_fp16` extension bei
olestrohm updated this revision to Diff 347922.
olestrohm added a comment.
I've cleaned up the check. The qualifiers of SrcType are removed prior to this
function, so only DestType needs to have the address space removed.
reinterpret_cast only allows integral types, so structs are not an issue h
olestrohm added inline comments.
Comment at: clang/lib/Sema/SemaOverload.cpp:9870
+ if (S.getLangOpts().OpenCL) {
+if (const auto *CD1 =
dyn_cast_or_null(Cand1.Function)) {
Anastasia wrote:
> olestrohm wrote:
> > Anastasia wrote:
> > > olestrohm wrote:
>
olestrohm updated this revision to Diff 347872.
olestrohm added a comment.
Made the check more general, it's no longer OpenCL specific and no longer
restricted to just constructors, since the check only requires them to be
methods.
Also added more Sema tests, including using FileCheck to check
olestrohm added inline comments.
Comment at: clang/lib/Sema/SemaOverload.cpp:9870
+ if (S.getLangOpts().OpenCL) {
+if (const auto *CD1 =
dyn_cast_or_null(Cand1.Function)) {
Anastasia wrote:
> olestrohm wrote:
> > Anastasia wrote:
> > > I think we should r
olestrohm added inline comments.
Comment at: clang/lib/Sema/SemaOverload.cpp:9870
+ if (S.getLangOpts().OpenCL) {
+if (const auto *CD1 =
dyn_cast_or_null(Cand1.Function)) {
Anastasia wrote:
> I think we should remove the OpenCL check since it is not OpenC
olestrohm created this revision.
olestrohm added reviewers: Anastasia, svenvh.
olestrohm added a project: clang.
Herald added subscribers: ldrumm, yaxunl.
olestrohm requested review of this revision.
Herald added a subscriber: cfe-commits.
This fixes the prioritization of address spaces when choos
olestrohm created this revision.
olestrohm added reviewers: Anastasia, rjmccall.
olestrohm added a project: clang.
Herald added subscribers: ldrumm, yaxunl.
olestrohm requested review of this revision.
Herald added a subscriber: cfe-commits.
Allow converting between types with different address sp
This revision was automatically updated to reflect the committed changes.
Closed by commit rG642d2f000b26: [OpenCL] Fix initialization of __constant
constructors without arguments (authored by olestrohm).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/
olestrohm updated this revision to Diff 345845.
olestrohm added a comment.
Relaxed the checks in the codegen test because of failures on platforms with
slightly different IR being generated.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102248/new/
https://reviews.llvm.org/D102248
Fil
This revision was automatically updated to reflect the committed changes.
Closed by commit rG66b112d624a5: [OpenCL] Fix reinterpret_cast of vectors
(authored by olestrohm).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101519/new/
https://reviews.ll
olestrohm updated this revision to Diff 345442.
olestrohm added a comment.
Fixed the code style and added some comments to the tests.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101519/new/
https://reviews.llvm.org/D101519
Files:
clang/include/clang/Sema/Sema.h
clang/lib/Sema/Sem
olestrohm updated this revision to Diff 345436.
olestrohm added a comment.
Added a codegen test and clarified what some parts are testing.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102248/new/
https://reviews.llvm.org/D102248
Files:
clang/lib/Sema/SemaDecl.cpp
clang/test/CodeGe
olestrohm added inline comments.
Comment at: clang/test/SemaOpenCLCXX/addrspace-constructors.clcpp:36
+ Z() __local = default;
+ Z() __global = default;
+ constexpr Z() __constant : z(0) {}
Anastasia wrote:
> We seem to be missing the coverage with __constant
olestrohm created this revision.
olestrohm added reviewers: Anastasia, svenvh.
olestrohm added a project: clang.
Herald added subscribers: ldrumm, yaxunl.
olestrohm requested review of this revision.
Herald added a subscriber: cfe-commits.
This fixes the implicit initialization that uses construct
olestrohm updated this revision to Diff 344408.
olestrohm added a comment.
I tried to add a special case for 3 and 4 element vectors, but that caused
issues in codgen, so I've left it as a FIXME for now.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101519/new/
https://reviews.llvm.org
olestrohm updated this revision to Diff 343647.
olestrohm retitled this revision from "[C++4OpenCL] Fix reinterpret_cast of
vectors and types with address spaces" to "[C++4OpenCL] Fix reinterpret_cast of
vectors".
olestrohm set the repository for this revision to rG LLVM Github Monorepo.
olestroh
olestrohm added inline comments.
Comment at: clang/test/SemaOpenCLCXX/reinterpret-cast.clcpp:1
+// RUN: %clang_cc1 %s -pedantic -verify -fsyntax-only
+
Anastasia wrote:
> Btw I assume your patch also allows reinterpret_cast between vectors? What
> happens if we
olestrohm updated this revision to Diff 341844.
olestrohm added a comment.
Fixed formatting.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101519/new/
https://reviews.llvm.org/D101519
Files:
clang/include/clang/Sema/Sema.h
clang/lib/Sema/SemaCast.cpp
clang/lib/Sema/SemaExpr.cpp
olestrohm updated this revision to Diff 341831.
olestrohm added a comment.
Fixed merge error
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101168/new/
https://reviews.llvm.org/D101168
Files:
clang/docs/LanguageExtensions.rst
clang/include/clang/Basic/OpenCLExtensions.def
clang/li
olestrohm updated this revision to Diff 341526.
olestrohm set the repository for this revision to rG LLVM Github Monorepo.
olestrohm added a comment.
Added a link to the C++ for OpenCL specification and cleaned up the text
according to the requests.
Repository:
rG LLVM Github Monorepo
CHANGE
olestrohm created this revision.
olestrohm added reviewers: Anastasia, svenvh.
olestrohm added a project: clang.
Herald added subscribers: ldrumm, yaxunl.
olestrohm requested review of this revision.
Herald added a subscriber: cfe-commits.
This fixes two issues with reinterpret_cast in C++ for Ope
olestrohm updated this revision to Diff 340796.
olestrohm added a comment.
Improved the description and example per the feedback.
The check for dependent type is needed. If it is not included the diagnostic
will get triggered when the extension is disabled, but not when it's enabled.
CHANGES S
olestrohm added inline comments.
Comment at: clang/lib/Sema/SemaDecl.cpp:8651
static OpenCLParamType getOpenCLKernelParameterType(Sema &S, QualType PT) {
+ if (PT->isDependentType())
+return InvalidKernelParam;
Anastasia wrote:
> I would rather add an asser
olestrohm created this revision.
olestrohm added reviewers: Anastasia, svenvh.
olestrohm added a project: clang.
Herald added subscribers: ldrumm, kerbowa, jfb, yaxunl, nhaehnle, jvesely,
jholewinski.
olestrohm requested review of this revision.
Herald added a subscriber: cfe-commits.
This featur
olestrohm updated this revision to Diff 339976.
olestrohm added a comment.
I noticed that I could move the new check above the diagnostic for program
scope variables, and the check during parsing can then be removed, while
maintaining good diagnostics.
This does change the diagnostic for `event
olestrohm added a comment.
The only ones that change (in the test cases at least) are as follows:
Here Old is with the current change, and New is with the call to
`diagnoseOpenCLTypes` at parsing removed.
In `event_t.cl`, `event_t glb_evt;` in program scope has this difference:
Old:
the '
olestrohm updated this revision to Diff 339251.
olestrohm added a comment.
Renamed test as suggested.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100860/new/
https://reviews.llvm.org/D100860
Files:
clang/lib/Sema/SemaDecl.cpp
clang/test/SemaOpenCL/clk_event_t.cl
clang/test/Sema
olestrohm updated this revision to Diff 339197.
olestrohm added a comment.
Ran git-clang-format.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100860/new/
https://reviews.llvm.org/D100860
Files:
clang/lib/Sema/SemaDecl.cpp
clang/test/SemaOpenCL/clk_event_t.cl
clang/test/SemaOpenC
olestrohm updated this revision to Diff 339175.
olestrohm added a comment.
Inlined the `thread_local` check and moved `static clk_event_t` into the
appropriate test.
I did not move the `thread_local` check since NewVD had the wrong value for
`TSCS`, so D was required.
CHANGES SINCE LAST ACTION
olestrohm created this revision.
olestrohm added reviewers: Anastasia, svenvh.
Herald added subscribers: ldrumm, wenlei, yaxunl.
olestrohm requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
For templates diagnosis must be done after specializa
olestrohm updated this revision to Diff 338032.
olestrohm set the repository for this revision to rG LLVM Github Monorepo.
olestrohm added a comment.
Restricted the checks to C++ for OpenCL and added another test for OpenCL
vector types.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST
olestrohm added inline comments.
Comment at: clang/lib/Sema/SemaDecl.cpp:8673
+// reference if an implementation supports them in kernel parameters.
+if (!PointeeType->isAtomicType() && !PointeeType->isVoidType() &&
+!PointeeType->isStandardLayoutType())
-
olestrohm updated this revision to Diff 337450.
olestrohm added a comment.
Added more exhaustive tests, as well as fixed the diagnostic to allow reference
types.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100471/new/
https://reviews.llvm.org/D100471
Files:
clang/lib/Sema/SemaDecl
olestrohm created this revision.
olestrohm added reviewers: Anastasia, svenvh.
olestrohm added a project: clang.
Herald added subscribers: ldrumm, jfb, yaxunl.
olestrohm requested review of this revision.
Herald added a subscriber: cfe-commits.
Adds extra error diagnostics when using unsupported t
olestrohm updated this revision to Diff 283909.
olestrohm added a comment.
I have amended the relevant test to validate this behaviour in C++ for OpenCL.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85429/new/
https://reviews.llvm.org/D85429
Files:
clang/lib/Lex/PPDirectives.cpp
c
olestrohm created this revision.
olestrohm added a reviewer: Anastasia.
olestrohm added a project: clang.
Herald added subscribers: cfe-commits, yaxunl.
olestrohm requested review of this revision.
C++ for OpenCL intends to support variadic macros, a decision motivated by
OpenCL 3.0. This patch s
olestrohm updated this revision to Diff 279485.
olestrohm added a comment.
The code now directly adds the __generic address space to the pointee type.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83665/new/
https://reviews.llvm.org/D83665
Files:
clang/lib/Sema/SemaTemplateDeduction.
olestrohm marked an inline comment as done.
olestrohm added inline comments.
Comment at: clang/lib/Sema/SemaTemplateDeduction.cpp:3811
+ if(S.getLangOpts().OpenCL)
+ArgType = S.deduceOpenCLPointeeAddrSpace(ArgType);
ArgType = S.Context.getLValueReferenceType(A
olestrohm created this revision.
olestrohm added reviewers: Anastasia, rjmccall.
olestrohm added a project: clang.
Herald added subscribers: cfe-commits, yaxunl.
When you have a templated constructor with an R-value reference the compiler
implicitly creates a copy and move constructor through the
olestrohm updated this revision to Diff 276369.
olestrohm marked an inline comment as done.
olestrohm added a comment.
I've removed the comments calling for a fix because I no longer feel that this
approach needs that. Given the code that already exists, and without changing
too much of it, addi
olestrohm updated this revision to Diff 275381.
olestrohm added a comment.
I have added a check in `deduceOpenCLAddressSpace()` to check if the type is
dependent, and not deduce the address space if it is. This is a big change in
the behaviour of address space deduction, meaning that template va
olestrohm updated this revision to Diff 275351.
olestrohm added a comment.
Disregard the last comment, rolling back that diff for now.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82781/new/
https://reviews.llvm.org/D82781
Files:
clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
clan
olestrohm updated this revision to Diff 275345.
olestrohm added a comment.
Added a guard in deduceOpenCLAddressSpace to stop it from deducing address
space for dependent types, as requested.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82781/new/
https://reviews.llvm.org/D82781
Files
olestrohm added a comment.
Essentially, in each pass the type for the variable starts off being extract
from the SourceTypeInfo, but since the address space isn't specified, this type
is then missing an address space.
Adding the address space deduction then reintroduces the address space to the
olestrohm created this revision.
olestrohm added reviewers: Anastasia, rjmccall.
olestrohm added a project: clang.
Herald added a subscriber: yaxunl.
This patch fixes two instances of not deducing address spaces for global
template variables.
I've added OpenCL address space deduction to the funct
68 matches
Mail list logo