Page MenuHomePhabricator

Anastasia (Anastasia Stulova)
Compiler Engineer at ARM / Code Owner of OpenCL in Clang

Projects

User does not belong to any projects.

User Details

User Since
Mar 5 2015, 8:05 AM (228 w, 3 d)

Recent Activity

Thu, Jul 18

Anastasia added a comment to D64569: [OpenCL] Improve destructor support in C++ for OpenCL.

The commit has been reverted due to issues with libc++:

Thu, Jul 18, 6:47 AM · Restricted Project, Restricted Project
Anastasia added a comment to D59426: [PR41010][OpenCL] Allow OpenCL C style vector initialization in C++.

ping!

Thu, Jul 18, 3:30 AM
Anastasia committed rG46b55fa58dea: [OpenCL] Update comments/diagnostics to refer to C++ for OpenCL (authored by Anastasia).
[OpenCL] Update comments/diagnostics to refer to C++ for OpenCL
Thu, Jul 18, 3:03 AM
Anastasia accepted D64569: [OpenCL] Improve destructor support in C++ for OpenCL.

LGTM! Thanks!

Thu, Jul 18, 2:58 AM · Restricted Project, Restricted Project
Anastasia added inline comments to D64867: [OpenCL] Update comments/diagnostics to refer to C++ for OpenCL mode.
Thu, Jul 18, 2:24 AM · Restricted Project
Anastasia committed rG36d9e8358aa2: [OpenCL][PR42033] Fix addr space deduction with template parameters (authored by Anastasia).
[OpenCL][PR42033] Fix addr space deduction with template parameters
Thu, Jul 18, 2:14 AM

Wed, Jul 17

Anastasia updated the diff for D64867: [OpenCL] Update comments/diagnostics to refer to C++ for OpenCL mode.
  • Updated comments
  • Added motivation
Wed, Jul 17, 11:33 AM · Restricted Project
Anastasia reopened D64418: [Docs][OpenCL] Documentation of C++ for OpenCL mode.

Reopening to continue reviews.

Wed, Jul 17, 11:28 AM · Restricted Project
Anastasia committed rG79f4e4770b72: [Docs][OpenCL] Documentation of C++ for OpenCL mode (authored by Anastasia).
[Docs][OpenCL] Documentation of C++ for OpenCL mode
Wed, Jul 17, 10:22 AM
Anastasia added a comment to D64418: [Docs][OpenCL] Documentation of C++ for OpenCL mode.

Very useful to have all of this documented! Thanks!

Wed, Jul 17, 7:47 AM · Restricted Project
Anastasia created D64867: [OpenCL] Update comments/diagnostics to refer to C++ for OpenCL mode.
Wed, Jul 17, 6:36 AM · Restricted Project
Anastasia updated the diff for D62584: [OpenCL][PR42033] Deducing addr space with template parameter types.

Fixed typo in the comment

Wed, Jul 17, 2:43 AM · Restricted Project

Tue, Jul 16

Anastasia updated the diff for D64418: [Docs][OpenCL] Documentation of C++ for OpenCL mode.
Tue, Jul 16, 8:11 AM · Restricted Project
Anastasia accepted D64791: [OpenCL] Fix sampler initialization for C++ mode.

I expect the example from the bug is going to compile now: https://bugs.llvm.org/show_bug.cgi?id=41009

Tue, Jul 16, 5:02 AM · Restricted Project
Anastasia added inline comments to D64418: [Docs][OpenCL] Documentation of C++ for OpenCL mode.
Tue, Jul 16, 4:56 AM · Restricted Project
Anastasia updated the diff for D64418: [Docs][OpenCL] Documentation of C++ for OpenCL mode.

Addressed some review comments. Refs are still to be fixed!

Tue, Jul 16, 4:53 AM · Restricted Project
Anastasia added a comment to D62584: [OpenCL][PR42033] Deducing addr space with template parameter types.

Oh, yes, it definitely can't be done to class types. I suppose we should just forget about it.

Ok, regarding address space qualifiers in template instantiation - is it still ok that we ignore them here in this patch?

I think ignoring them in templates rather than diagnosing is the right thing to do, since it means that reasonable things, e.g. template functions returning T, won't be erroneous if you instantiate T = __global int just like they wouldn't be with T = const int.

Tue, Jul 16, 2:49 AM · Restricted Project

Mon, Jul 15

Anastasia accepted D64608: [OpenCL] Make TableGen'd builtin tables and helper functions static.

LGTM! Thanks!

Mon, Jul 15, 6:25 AM · Restricted Project, Restricted Project
Anastasia committed rGd6f34bf4d4a3: [OpenCL] Deduce addr space for pointee of dependent types in instantiation. (authored by Anastasia).
[OpenCL] Deduce addr space for pointee of dependent types in instantiation.
Mon, Jul 15, 6:03 AM
Anastasia committed rG960ff0810da8: [OpenCL][PR41727] Prevent ICE on global dtors (authored by Anastasia).
[OpenCL][PR41727] Prevent ICE on global dtors
Mon, Jul 15, 4:59 AM
Anastasia added inline comments to D64418: [Docs][OpenCL] Documentation of C++ for OpenCL mode.
Mon, Jul 15, 4:43 AM · Restricted Project
Anastasia added a comment to D59426: [PR41010][OpenCL] Allow OpenCL C style vector initialization in C++.

@rsmith, do you have any comments here? It would be quite useful to have this patch in Clang9.

Mon, Jul 15, 4:13 AM
Anastasia added a comment to D64083: [OpenCL][Sema] Improve address space support for blocks.

Okay, so it sounds like *from the language perspective* all block pointers are actually pointers into __generic, and the thing with literals is just an implementation detail that's been inappropriately expressed in the AST. The better implementation strategy is to make sure that (1) the AST uses the size/alignment of a __generic pointer for a block pointer and (2) IRGen implicitly converts block literals to __generic pointers when it emits them, and then there's no such thing as a block pointer to a qualified type.

This is actually important to get right in C++ because of auto and templates; you really don't want non-generic block pointer types to become an expressible thing in the language.

Mon, Jul 15, 3:42 AM · Restricted Project, Restricted Project
Anastasia added a comment to D62584: [OpenCL][PR42033] Deducing addr space with template parameter types.

Oh, yes, it definitely can't be done to class types. I suppose we should just forget about it.

Mon, Jul 15, 3:01 AM · Restricted Project

Fri, Jul 12

Anastasia added a comment to D64400: [OpenCL][PR42390] Deduce addr space for templ specialization.

There are some code paths that I think are common between the parser and template instantiation, like BuildPointerType and BuildReferenceType, but if you want to do context-sensitive inference that might not be good enough.

Fri, Jul 12, 8:12 AM · Restricted Project
Anastasia added inline comments to D62584: [OpenCL][PR42033] Deducing addr space with template parameter types.
Fri, Jul 12, 8:06 AM · Restricted Project
Anastasia added inline comments to D62413: [OpenCL][PR41727] Prevent ICE on global dtors.
Fri, Jul 12, 5:04 AM · Restricted Project
Anastasia updated the diff for D62413: [OpenCL][PR41727] Prevent ICE on global dtors.

Generate NULL for pointer param of __cxa_atexit on mismatching addr spaces

Fri, Jul 12, 5:04 AM · Restricted Project
Anastasia added inline comments to D64569: [OpenCL] Improve destructor support in C++ for OpenCL.
Fri, Jul 12, 4:53 AM · Restricted Project, Restricted Project
Anastasia added inline comments to D64083: [OpenCL][Sema] Improve address space support for blocks.
Fri, Jul 12, 4:03 AM · Restricted Project, Restricted Project

Thu, Jul 11

Anastasia added inline comments to D64083: [OpenCL][Sema] Improve address space support for blocks.
Thu, Jul 11, 7:14 AM · Restricted Project, Restricted Project
Anastasia added inline comments to D64400: [OpenCL][PR42390] Deduce addr space for templ specialization.
Thu, Jul 11, 6:54 AM · Restricted Project
Anastasia updated the diff for D64400: [OpenCL][PR42390] Deduce addr space for templ specialization.
  • Moved addr space inference of pointee type into template instantiation.
Thu, Jul 11, 6:43 AM · Restricted Project
Anastasia added inline comments to D62413: [OpenCL][PR41727] Prevent ICE on global dtors.
Thu, Jul 11, 1:29 AM · Restricted Project

Wed, Jul 10

Anastasia added inline comments to D62584: [OpenCL][PR42033] Deducing addr space with template parameter types.
Wed, Jul 10, 11:42 AM · Restricted Project
Anastasia added inline comments to D62413: [OpenCL][PR41727] Prevent ICE on global dtors.
Wed, Jul 10, 10:34 AM · Restricted Project
Anastasia updated the diff for D62413: [OpenCL][PR41727] Prevent ICE on global dtors.

Changed API for target hook.

Wed, Jul 10, 10:34 AM · Restricted Project
Anastasia added inline comments to D64400: [OpenCL][PR42390] Deduce addr space for templ specialization.
Wed, Jul 10, 9:46 AM · Restricted Project
Anastasia updated the diff for D64400: [OpenCL][PR42390] Deduce addr space for templ specialization.
  • Added handling of similar test case with InjectedClassNameType
Wed, Jul 10, 9:43 AM · Restricted Project
Anastasia added inline comments to D64083: [OpenCL][Sema] Improve address space support for blocks.
Wed, Jul 10, 5:13 AM · Restricted Project, Restricted Project

Tue, Jul 9

Anastasia added a reviewer for D64418: [Docs][OpenCL] Documentation of C++ for OpenCL mode: kpet.
Tue, Jul 9, 8:11 AM · Restricted Project
Anastasia created D64418: [Docs][OpenCL] Documentation of C++ for OpenCL mode.
Tue, Jul 9, 7:25 AM · Restricted Project
Anastasia accepted D64409: [libclang] Fix hang in release / assertion in debug when evaluating value-dependent types..

LGTM! Thanks!

Tue, Jul 9, 7:18 AM · Restricted Project, Restricted Project
Anastasia created D64400: [OpenCL][PR42390] Deduce addr space for templ specialization.
Tue, Jul 9, 4:41 AM · Restricted Project

Wed, Jul 3

Anastasia added inline comments to D63555: [OpenCL] Add extension handling for builtin functions.
Wed, Jul 3, 11:02 AM · Restricted Project, Restricted Project
Anastasia accepted D63876: [OpenCL] Define CLK_NULL_EVENT without cast.

If you like you can also change reserve_id_t. :)

Wed, Jul 3, 10:44 AM · Restricted Project, Restricted Project
Anastasia accepted D64074: [OpenCL][Sema] Fix builtin rewriting.

LGTM! Thanks!

Wed, Jul 3, 10:42 AM · Restricted Project
Anastasia accepted D63608: Remove some autoconf references from docs and comments.

LGTM! Thanks!

Wed, Jul 3, 2:32 AM · Restricted Project

Tue, Jul 2

Anastasia accepted D64083: [OpenCL][Sema] Improve address space support for blocks.

LGTM! Thanks! I would suggest to wait a day or two before committing just in case John has any feedback.

Tue, Jul 2, 9:05 AM · Restricted Project, Restricted Project
Anastasia updated the diff for D62413: [OpenCL][PR41727] Prevent ICE on global dtors.

Added a target hook to query address spaces with the largest pointer width.

Tue, Jul 2, 9:02 AM · Restricted Project
Anastasia added a comment to D64074: [OpenCL][Sema] Fix builtin rewriting.

I would say in the interest of saving testing time running one of those test in C++ mode should be enough.

Tue, Jul 2, 7:54 AM · Restricted Project
Anastasia added inline comments to D62584: [OpenCL][PR42033] Deducing addr space with template parameter types.
Tue, Jul 2, 7:47 AM · Restricted Project
Anastasia updated the diff for D62584: [OpenCL][PR42033] Deducing addr space with template parameter types.
  • Removed diagnostic for address space in return type in tree transforms
Tue, Jul 2, 7:47 AM · Restricted Project
Anastasia added inline comments to D63434: [OpenCL] Add generic type handling for builtin functions.
Tue, Jul 2, 6:04 AM · Restricted Project, Restricted Project
Anastasia added inline comments to D62574: Initial draft of target-configurable address spaces..
Tue, Jul 2, 3:33 AM · Restricted Project

Mon, Jul 1

Anastasia added a comment to D63876: [OpenCL] Define CLK_NULL_EVENT without cast.

btw, there seems to be the same issue with reserve_id_t?

Mon, Jul 1, 10:07 AM · Restricted Project, Restricted Project
Anastasia added a comment to D63480: [OpenCL] Add image type handling for builtin functions.

This patch adds handling for OpenCL builtin functions.

Mon, Jul 1, 9:56 AM · Restricted Project, Restricted Project
Anastasia added inline comments to D63442: [OpenCL] Add const, volatile and pointer handling for builtin functions.
Mon, Jul 1, 9:17 AM · Restricted Project, Restricted Project
Anastasia added a comment to D63710: [SYCL] Re-use OpenCL sampler in SYCL device mode.

For instance, OpenCL kernel in SYCL mode initializes lambda captures with
the kernel argument values. This initialization code for sampler emits
errors because OpenCL disallows sampler on the right hand side of the
binary operators - these are supposed to be used only by built-in
functions.

Mon, Jul 1, 9:02 AM · Restricted Project
Anastasia added a comment to D63557: [OpenCL] Group builtin functions by prototype.

Functions having only one prototype will point to a prototype
definition of another function.

Mon, Jul 1, 8:38 AM · Restricted Project, Restricted Project
Anastasia added inline comments to D63504: [OpenCL] Add version handling for builtin functions.
Mon, Jul 1, 8:03 AM · Restricted Project, Restricted Project

Jun 21 2019

Anastasia committed rG999f676d7559: [OpenCL][PR41963] Add generic addr space to old atomics in C++ mode (authored by Anastasia).
[OpenCL][PR41963] Add generic addr space to old atomics in C++ mode
Jun 21 2019, 9:18 AM
Anastasia added inline comments to D62413: [OpenCL][PR41727] Prevent ICE on global dtors.
Jun 21 2019, 7:48 AM · Restricted Project
Anastasia added inline comments to D62584: [OpenCL][PR42033] Deducing addr space with template parameter types.
Jun 21 2019, 7:29 AM · Restricted Project
Anastasia added inline comments to D63555: [OpenCL] Add extension handling for builtin functions.
Jun 21 2019, 7:05 AM · Restricted Project, Restricted Project
Anastasia added inline comments to D63442: [OpenCL] Add const, volatile and pointer handling for builtin functions.
Jun 21 2019, 6:54 AM · Restricted Project, Restricted Project
Anastasia added a comment to D63434: [OpenCL] Add generic type handling for builtin functions.

Generic types are an abstraction of type sets. It mimics the way functions
are defined in the OpenCL specification.

Jun 21 2019, 6:54 AM · Restricted Project, Restricted Project
Anastasia committed rG3562edb9c49e: [Sema] Fix diagnostic for addr spaces in reference binding (authored by Anastasia).
[Sema] Fix diagnostic for addr spaces in reference binding
Jun 21 2019, 4:36 AM
Anastasia committed rG1da9e4c910d1: [Sema] Improved diagnostic for qualifiers in reference binding (authored by Anastasia).
[Sema] Improved diagnostic for qualifiers in reference binding
Jun 21 2019, 3:50 AM

Jun 20 2019

Anastasia added a comment to D62574: Initial draft of target-configurable address spaces..

I'll have to see if that's possible without breaking a few more interfaces, since you can throw around Qualifiers and check for compatibility without an ASTContext today.

I was just thinking about testing the new logic. Should we add something like -ffake-address-space-map (https://clang.llvm.org/docs/UsersManual.html#opencl-specific-options) that will force targets to use some implementation of fake address space conversions? It was quite useful in OpenCL before we added concrete targets with address spaces. Alternatively, we can try to use SPIR that is a generic Clang-only target that has address spaces.

Well, there are a couple targets which have target address spaces even today, I think. AMDGPU should be one, right?

Yes, however I am not sure we will be able to test more than what we test with OpenCL. Also I am not sure AMD maintainer would be ok. Do you have any concrete idea of what to test?

Well, since there is a mapping from the OpenCL address spaces to the AMDGPU target spaces, I would presume that if the target spaces were used on their own (via __attribute__((address_space(1))) for example) they should behave similarly to their OpenCL counterparts. It wouldn't have to be much, just a couple of type definitions and checks for implicit/explicit cast behavior.

There's also the x86 case I mentioned. I'm not really sure how that feature is used, though.

Jun 20 2019, 9:47 AM · Restricted Project
Anastasia added inline comments to D62156: [Sema][PR41730] Diagnose addr space mismatch while constructing objects.
Jun 20 2019, 9:42 AM · Restricted Project
Anastasia committed rGc25ea86d4392: [Sema] Diagnose addr space mismatch while constructing objects (authored by Anastasia).
[Sema] Diagnose addr space mismatch while constructing objects
Jun 20 2019, 9:22 AM
Anastasia accepted D63561: [OpenCL] Improve diagnostic for placement new.

LGTM. Thanks!

Jun 20 2019, 6:58 AM · Restricted Project, Restricted Project

Jun 5 2019

Anastasia added a comment to D54258: [Clang] Fix pretty printing of CUDA address spaces.

Merging in two weeks is fine for me.

Jun 5 2019, 10:28 AM · Restricted Project, Restricted Project
Anastasia committed rGd97ea1bc1aca: [Clang] Fix pretty printing of CUDA address spaces (authored by Anastasia).
[Clang] Fix pretty printing of CUDA address spaces
Jun 5 2019, 10:27 AM
Anastasia added a reviewer for D60193: [OpenCL] Added addrspace_cast operator: mantognini.
Jun 5 2019, 9:22 AM
Anastasia added a comment to D60193: [OpenCL] Added addrspace_cast operator.

Ping! I would appreciate any feedback to this change please. Thanks you!

Jun 5 2019, 9:22 AM
Anastasia created D62914: [Sema] Fix diagnostic for addr spaces in reference binding.
Jun 5 2019, 9:21 AM · Restricted Project
Anastasia abandoned D58060: Fix diagnostic for addr spaces in reference binding.

Due to my recent commits I had to changed this slightly so it is now under a new review: https://reviews.llvm.org/D62914

Jun 5 2019, 9:21 AM
Anastasia committed rG7ca9b978c4f4: [OpenCL][PR42031] Prevent deducing addr space in type alias. (authored by Anastasia).
[OpenCL][PR42031] Prevent deducing addr space in type alias.
Jun 5 2019, 7:48 AM
Anastasia committed rG5145b1e4421a: [Sema] Prevent binding incompatible addr space ref to temporaries (authored by Anastasia).
[Sema] Prevent binding incompatible addr space ref to temporaries
Jun 5 2019, 7:03 AM

Jun 3 2019

Anastasia added a comment to D62574: Initial draft of target-configurable address spaces..

This patch does not address the issue with the accessors
on Qualifiers (isAddressSpaceSupersetOf, compatiblyIncludes),
because I don't know how to solve it without breaking a ton of
rather nice encapsulation. Either, every mention of compatiblyIncludes
must be replaced with a call to a corresponding ASTContext method,
Qualifiers must have a handle to ASTContext, or ASTContext must be
passed to every such call. This revision mentions the issue in a comment:
https://reviews.llvm.org/D49294

I think using ASTContext helper is ok then.

Alright. Just to clarify, you mean the first option (using a new accessor on ASTContext and replacing all existing compatiblyIncludes with that)?

Jun 3 2019, 11:31 AM · Restricted Project
Anastasia added inline comments to D62584: [OpenCL][PR42033] Deducing addr space with template parameter types.
Jun 3 2019, 11:02 AM · Restricted Project
Anastasia added a comment to D62584: [OpenCL][PR42033] Deducing addr space with template parameter types.

I think the right approach here is probably to make sure you're applying deduction during instantiation as well.

Jun 3 2019, 10:55 AM · Restricted Project
Anastasia updated the diff for D62584: [OpenCL][PR42033] Deducing addr space with template parameter types.
  • Added more test cases
  • Improved diagnostics to account for use of templates with addr spaces
Jun 3 2019, 10:51 AM · Restricted Project
Anastasia committed rG5099aef86964: [PR41567][Sema] Fixed cast kind in addr space conversions (authored by Anastasia).
[PR41567][Sema] Fixed cast kind in addr space conversions
Jun 3 2019, 8:42 AM
Anastasia added inline comments to D60455: [SYCL] Implement SYCL device code outlining.
Jun 3 2019, 7:55 AM · Restricted Project
Anastasia added a comment to D62591: [OpenCL][PR42031] Prevent deducing addr space in type alias..

@mantognini Good spot! Thanks!

Jun 3 2019, 7:35 AM · Restricted Project
Anastasia updated the diff for D62591: [OpenCL][PR42031] Prevent deducing addr space in type alias..
  • Exclude pointee from early return in addr space deduction
  • Improved testing: added FileCheck and avoid testing unnecessary bits
Jun 3 2019, 7:30 AM · Restricted Project
Anastasia added inline comments to D62413: [OpenCL][PR41727] Prevent ICE on global dtors.
Jun 3 2019, 6:55 AM · Restricted Project
Anastasia updated the diff for D62413: [OpenCL][PR41727] Prevent ICE on global dtors.
  • Guard OpenCL specific IR generation under OpenCL lang mode
Jun 3 2019, 6:49 AM · Restricted Project
Anastasia updated the diff for D62156: [Sema][PR41730] Diagnose addr space mismatch while constructing objects.

Changed FIXME to a regular comment, modified wording.

Jun 3 2019, 4:37 AM · Restricted Project
Anastasia added inline comments to D62156: [Sema][PR41730] Diagnose addr space mismatch while constructing objects.
Jun 3 2019, 4:37 AM · Restricted Project
Anastasia added inline comments to D60455: [SYCL] Implement SYCL device code outlining.
Jun 3 2019, 3:01 AM · Restricted Project
Anastasia accepted D62580: [OpenCL] Use long instead of long long in x86 builtins.

LGTM! Thanks!

Jun 3 2019, 3:00 AM · Restricted Project, Restricted Project

May 30 2019

Anastasia added a comment to D62574: Initial draft of target-configurable address spaces..

This patch does not address the issue with the accessors
on Qualifiers (isAddressSpaceSupersetOf, compatiblyIncludes),
because I don't know how to solve it without breaking a ton of
rather nice encapsulation. Either, every mention of compatiblyIncludes
must be replaced with a call to a corresponding ASTContext method,
Qualifiers must have a handle to ASTContext, or ASTContext must be
passed to every such call. This revision mentions the issue in a comment:
https://reviews.llvm.org/D49294

May 30 2019, 12:07 PM · Restricted Project
Anastasia committed rGf61b5481fd2c: [OpenCL] Fix OpenCL/SPIR version metadata in C++ mode. (authored by Anastasia).
[OpenCL] Fix OpenCL/SPIR version metadata in C++ mode.
May 30 2019, 11:11 AM
Anastasia added inline comments to D60455: [SYCL] Implement SYCL device code outlining.
May 30 2019, 10:53 AM · Restricted Project
Anastasia added inline comments to D62156: [Sema][PR41730] Diagnose addr space mismatch while constructing objects.
May 30 2019, 7:46 AM · Restricted Project
Anastasia updated the diff for D62156: [Sema][PR41730] Diagnose addr space mismatch while constructing objects.
  • Improved diagnostic
  • Added more comments
May 30 2019, 7:46 AM · Restricted Project