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 (210 w, 4 d)

Recent Activity

Today

Anastasia created D59544: [OpenCL] Minor improvements in default header testing.
Tue, Mar 19, 7:05 AM
Anastasia committed rGbaa506319abd: [OpenCL] Improved testing of default header. (authored by Anastasia).
[OpenCL] Improved testing of default header.
Tue, Mar 19, 6:03 AM
Anastasia added inline comments to D59486: [OpenCL] Improve testing of default header in C++ mode.
Tue, Mar 19, 5:25 AM · Restricted Project
Anastasia added a comment to D59492: [OpenCL] Allow variadic macros as Clang feature.

Should it be downgraded to a warning about an extension instead of just removing it?

Tue, Mar 19, 4:30 AM

Yesterday

Anastasia added inline comments to D59486: [OpenCL] Improve testing of default header in C++ mode.
Mon, Mar 18, 8:50 AM · Restricted Project
Anastasia updated the diff for D59486: [OpenCL] Improve testing of default header in C++ mode.

Moved testing of default header in C++ mode to test/Headers/opencl-c-header.cl

Mon, Mar 18, 8:46 AM · Restricted Project
Anastasia added a comment to D59493: [OpenCL] Generate 'unroll.enable' metadata for __attribute__((opencl_unroll_hint)).

PS, I am just saying that I guess leaving this to the compiler is more helpful than explicitly requiring the full unroll. However, spec contradicts itself by first mentioning the full unroll and then stating that compiler will determines the unrolling factor.

Mon, Mar 18, 8:42 AM · Restricted Project
Anastasia accepted D59493: [OpenCL] Generate 'unroll.enable' metadata for __attribute__((opencl_unroll_hint)).

The wording in spec is confusing btw because it says:

Mon, Mar 18, 8:39 AM · Restricted Project
Anastasia updated the diff for D59492: [OpenCL] Allow variadic macros as Clang feature.

Fixed comment

Mon, Mar 18, 8:07 AM
Anastasia updated the diff for D59492: [OpenCL] Allow variadic macros as Clang feature.

Better wording

Mon, Mar 18, 8:03 AM
Anastasia created D59492: [OpenCL] Allow variadic macros as Clang feature.
Mon, Mar 18, 8:03 AM
Anastasia created D59486: [OpenCL] Improve testing of default header in C++ mode.
Mon, Mar 18, 5:43 AM · Restricted Project

Fri, Mar 15

Anastasia created D59426: [PR41010][OpenCL] Allow OpenCL C style vector initialization in C++.
Fri, Mar 15, 12:13 PM

Thu, Mar 14

Anastasia added inline comments to D59219: [PR41007][OpenCL] Allow printf and toolchain reserved variadic functions in C++.
Thu, Mar 14, 9:54 AM · Restricted Project
Anastasia removed a reviewer for D59367: [Sema] Adjust address space of operands in remaining builtin operators: bevinh.
Thu, Mar 14, 8:38 AM
Anastasia created D59367: [Sema] Adjust address space of operands in remaining builtin operators.
Thu, Mar 14, 8:36 AM

Wed, Mar 13

Anastasia accepted D59299: [libclang] Expose aligned() attribute..

LGTM! Thanks!

Wed, Mar 13, 8:26 AM · Restricted Project, Restricted Project

Tue, Mar 12

Anastasia committed rG47a2c3305a2f: [PR41007][OpenCL] Allow printf in C++ mode. (authored by Anastasia).
[PR41007][OpenCL] Allow printf in C++ mode.
Tue, Mar 12, 5:46 AM
Anastasia added a comment to D57464: Generalize method overloading on addr spaces to C++.

Any more input on this?

Tue, Mar 12, 4:35 AM

Mon, Mar 11

Anastasia created D59219: [PR41007][OpenCL] Allow printf and toolchain reserved variadic functions in C++.
Mon, Mar 11, 9:42 AM · Restricted Project

Thu, Mar 7

Anastasia closed D58708: [PR40778] Preserve addr space in Derived to Base cast .

Committed in r355606.

Thu, Mar 7, 9:10 AM
Anastasia committed rG6f7c536e083b: [Sema] Change addr space diagnostics in casts to follow C++ style. (authored by Anastasia).
[Sema] Change addr space diagnostics in casts to follow C++ style.
Thu, Mar 7, 9:06 AM
Anastasia committed rG27e5c212ee42: [PR40778][Sema] Adjust addr space of operands in builtin operators. (authored by Anastasia).
[PR40778][Sema] Adjust addr space of operands in builtin operators.
Thu, Mar 7, 8:43 AM
Anastasia committed rG94049554166c: [PR40778] Preserve addr space in Derived to Base cast. (authored by Anastasia).
[PR40778] Preserve addr space in Derived to Base cast.
Thu, Mar 7, 8:23 AM

Wed, Mar 6

Anastasia updated the diff for D58719: [PR40778][Sema] Adjust address space of operands in builtin operators.

I now create overloads for all address spaces that are being called.

Wed, Mar 6, 9:35 AM · Restricted Project
Anastasia committed rGd3ae87ee0d6c: [PR40778] Add addr space conversion when binding reference to a temporary. (authored by Anastasia).
[PR40778] Add addr space conversion when binding reference to a temporary.
Wed, Mar 6, 5:02 AM
Anastasia added a comment to D58236: Make address space conversions a bit stricter..

I think trying to reject code that is doing something dangerous is a good thing!

Refusing to compile code which is suspicious, but not forbidden by the specification, will likely cause compatibility issues; there are legitimate reasons to use casts which look weird.

The spec dioesn't allow these conversions either, it just simply doesn't cover this corner case at all. I don't think we are changing anything in terms of compatibility. If you have any examples of such casts that can be legitimate I would like to understand them better. What I have seen so far were the examples where addrspacecast was lost in IR for the memory segments translation and therefore wrong memory areas were accessed.

The spec just says that the casts follow C rules... and C says you can cast a pointer to an object type to a pointer to another object type (subject to alignment restrictions). By default, a pointer to a pointer isn't special.

In practice, unusual casts tend to show up in code building a datastructure using union-like constructs. In plain C, for example, sometimes you have a pointer to a float, and sometimes you have a pointer to an int, determined dynamically. I expect similar cases show up where a pointer points to memory which contains either a pointer in the global address-space, or a pointer in the local address-space, determined dynamically. In some cases, it might be clearer to use void* in more places, but that's mostly style issue.

Wed, Mar 6, 4:24 AM · Restricted Project
Anastasia updated the diff for D58346: [Sema] Change addr space diagnostics in casts to follow C++ style.

Restructure code with early return.

Wed, Mar 6, 3:26 AM · Restricted Project
Anastasia updated the diff for D58708: [PR40778] Preserve addr space in Derived to Base cast .
Wed, Mar 6, 3:03 AM
Anastasia added inline comments to D58708: [PR40778] Preserve addr space in Derived to Base cast .
Wed, Mar 6, 3:03 AM

Tue, Mar 5

Anastasia updated the diff for D58708: [PR40778] Preserve addr space in Derived to Base cast .

Use common pointer type.

Tue, Mar 5, 11:01 AM
Anastasia added a comment to D58346: [Sema] Change addr space diagnostics in casts to follow C++ style.

In the abstract, it would be nice to warn about casts that always have UB because the address spaces don't overlap; however, I'm worried about how people might be using address spaces in strange ways today, knowing that they *do* overlap, only in ways that the compiler isn't smart enough for. I think we should just be permissive in non-OpenCL mode.

Tue, Mar 5, 10:48 AM · Restricted Project
Anastasia updated the diff for D58346: [Sema] Change addr space diagnostics in casts to follow C++ style.

Updates FiXME explaining why C++ mode is more permissive.

Tue, Mar 5, 10:47 AM · Restricted Project
Anastasia updated the diff for D58060: Fix diagnostic for addr spaces in reference binding.

Un-commented the line in the test

Tue, Mar 5, 10:18 AM
Anastasia added inline comments to D58060: Fix diagnostic for addr spaces in reference binding.
Tue, Mar 5, 10:18 AM
Anastasia added inline comments to D58708: [PR40778] Preserve addr space in Derived to Base cast .
Tue, Mar 5, 10:09 AM
Anastasia updated the diff for D58708: [PR40778] Preserve addr space in Derived to Base cast .

Moved adding address space to DestType earlier to cover pointer and non-pointer case.

Tue, Mar 5, 10:07 AM
Anastasia updated the diff for D58634: [PR40778] Generate address space conversion when binding reference to a temporary value in different address space.
  • Implement the fix correctly by added an extra address space conversion step after binding the reference
Tue, Mar 5, 6:42 AM · Restricted Project
Anastasia updated the diff for D58060: Fix diagnostic for addr spaces in reference binding.
  • Fixed incorrect diagnostic in address space mismatch case when binding reference to a temporary value of a constant with incompatible type. Added missing test case.
Tue, Mar 5, 5:07 AM

Mon, Mar 4

Anastasia added a comment to D58346: [Sema] Change addr space diagnostics in casts to follow C++ style.

Hmm. Yeah, Embedded C allows these casts, so contra my previous comment, I think we can't make them ill-formed outside of OpenCL mode.

Mon, Mar 4, 3:51 AM · Restricted Project
Anastasia added a comment to D58236: Make address space conversions a bit stricter..

I think trying to reject code that is doing something dangerous is a good thing!

Refusing to compile code which is suspicious, but not forbidden by the specification, will likely cause compatibility issues; there are legitimate reasons to use casts which look weird.

Mon, Mar 4, 3:36 AM · Restricted Project
Anastasia accepted D58666: [OpenCL] Undefine cl_intel_planar_yuv extension.

LGTM! I am ok with this change to remove the macro from the common header. I don't think it belongs to there. However, I believe this functionality should be better represented in the vendors specific headers rather than clang directly. See my comment above!

Mon, Mar 4, 3:18 AM · Restricted Project

Thu, Feb 28

Anastasia added a comment to D58060: Fix diagnostic for addr spaces in reference binding.

Btw, I have changed the diagnostic wording... does this change make sense now?

Thu, Feb 28, 3:22 AM
Anastasia added a comment to D58236: Make address space conversions a bit stricter..

Along those lines, in general, the normal C rules should allow casting foo* to bar* for any object types foo and bar, even if foo and bar are pointers with address spaces, like __local int * and __global int *. I don't see anything in the OpenCL standard that would contradict this. It looks like this patch changes that?

Thu, Feb 28, 3:00 AM · Restricted Project
Anastasia added inline comments to D58346: [Sema] Change addr space diagnostics in casts to follow C++ style.
Thu, Feb 28, 2:43 AM · Restricted Project
Anastasia added inline comments to D58666: [OpenCL] Undefine cl_intel_planar_yuv extension.
Thu, Feb 28, 2:39 AM · Restricted Project

Wed, Feb 27

Anastasia added inline comments to D58346: [Sema] Change addr space diagnostics in casts to follow C++ style.
Wed, Feb 27, 10:18 AM · Restricted Project
Anastasia updated the diff for D58346: [Sema] Change addr space diagnostics in casts to follow C++ style.
  • Added a comment to explain OpenCL check.
Wed, Feb 27, 10:13 AM · Restricted Project
Anastasia added inline comments to D58666: [OpenCL] Undefine cl_intel_planar_yuv extension.
Wed, Feb 27, 9:57 AM · Restricted Project
Anastasia accepted D58236: Make address space conversions a bit stricter..

LGTM! Thanks a lot for fixing this old bug! Btw, do you plan to look at generalizing this to C++ as well?

Wed, Feb 27, 9:54 AM · Restricted Project
Anastasia updated the diff for D58719: [PR40778][Sema] Adjust address space of operands in builtin operators.
Wed, Feb 27, 9:12 AM · Restricted Project
Anastasia created D58719: [PR40778][Sema] Adjust address space of operands in builtin operators.
Wed, Feb 27, 8:16 AM · Restricted Project
Anastasia created D58708: [PR40778] Preserve addr space in Derived to Base cast .
Wed, Feb 27, 3:31 AM

Tue, Feb 26

Anastasia accepted D58658: [OpenCL] Fix assertion due to blocks.

LGTM! Thanks!

Tue, Feb 26, 4:30 AM · Restricted Project
Anastasia added inline comments to D58634: [PR40778] Generate address space conversion when binding reference to a temporary value in different address space.
Tue, Feb 26, 4:10 AM · Restricted Project
Anastasia accepted D58569: [libclang] Avoid crashing when getting layout info of an undeduced type..

LGTM! Thanks!

Tue, Feb 26, 3:57 AM · Restricted Project
Anastasia added inline comments to D58666: [OpenCL] Undefine cl_intel_planar_yuv extension.
Tue, Feb 26, 3:53 AM · Restricted Project

Mon, Feb 25

Anastasia added inline comments to D58569: [libclang] Avoid crashing when getting layout info of an undeduced type..
Mon, Feb 25, 9:59 AM · Restricted Project
Anastasia added inline comments to D58634: [PR40778] Generate address space conversion when binding reference to a temporary value in different address space.
Mon, Feb 25, 9:51 AM · Restricted Project
Anastasia created D58634: [PR40778] Generate address space conversion when binding reference to a temporary value in different address space.
Mon, Feb 25, 9:39 AM · Restricted Project
Anastasia added a comment to D58504: [OpenCL][8.0.0 Release] Notes for OpenCL.

Committed to the release branch r354799.

Mon, Feb 25, 9:08 AM · Restricted Project
Anastasia committed rGbb92074a2786: Release notes for OpenCL (authored by Anastasia).
Release notes for OpenCL
Mon, Feb 25, 9:08 AM
Anastasia added inline comments to D58504: [OpenCL][8.0.0 Release] Notes for OpenCL.
Mon, Feb 25, 3:37 AM · Restricted Project
Anastasia updated the diff for D58504: [OpenCL][8.0.0 Release] Notes for OpenCL.

Updated the section title!

Mon, Feb 25, 3:36 AM · Restricted Project
Anastasia added inline comments to D58569: [libclang] Avoid crashing when getting layout info of an undeduced type..
Mon, Feb 25, 3:33 AM · Restricted Project
Anastasia accepted D58570: [libclang] Expose warn_unused and warn_unused_result attributes..

LGTM! Although for consistency we could add this into python bindings too.

Mon, Feb 25, 3:10 AM · Restricted Project
Anastasia accepted D58571: [libclang] Fix a trivial error introduced in D57946..

LGTM! Thanks! I guess we are missing a python test? No idea why we are not testing it though...

Mon, Feb 25, 3:02 AM · Restricted Project, Restricted Project

Fri, Feb 22

Anastasia abandoned D16351: [FIX] Bug 25404 - Crash on typedef in OpenCL 2.0.

I just took the ownership of this to be able to close it.

Fri, Feb 22, 6:06 AM
Anastasia commandeered D16351: [FIX] Bug 25404 - Crash on typedef in OpenCL 2.0.

I just closed the bug because it's no longer failing on the master branch. So I don't think this is needed.

Fri, Feb 22, 6:05 AM

Thu, Feb 21

Anastasia added inline comments to D58504: [OpenCL][8.0.0 Release] Notes for OpenCL.
Thu, Feb 21, 11:24 AM · Restricted Project
Anastasia added inline comments to D58504: [OpenCL][8.0.0 Release] Notes for OpenCL.
Thu, Feb 21, 7:35 AM · Restricted Project
Anastasia updated subscribers of D58504: [OpenCL][8.0.0 Release] Notes for OpenCL.
Thu, Feb 21, 6:33 AM · Restricted Project
Anastasia added inline comments to D58504: [OpenCL][8.0.0 Release] Notes for OpenCL.
Thu, Feb 21, 6:33 AM · Restricted Project
Anastasia created D58504: [OpenCL][8.0.0 Release] Notes for OpenCL.
Thu, Feb 21, 6:27 AM · Restricted Project

Wed, Feb 20

Anastasia accepted D58388: [OpenCL] Simplify LLVM IR generated for OpenCL blocks.

LGTM! Great! Thanks!

Wed, Feb 20, 7:46 AM · Restricted Project
Anastasia updated the diff for D58346: [Sema] Change addr space diagnostics in casts to follow C++ style.

Added a CodeGen test to cover address space of reference in reinterpret_cast.

Wed, Feb 20, 6:51 AM · Restricted Project
Anastasia added inline comments to D58346: [Sema] Change addr space diagnostics in casts to follow C++ style.
Wed, Feb 20, 6:01 AM · Restricted Project
Anastasia added inline comments to D58346: [Sema] Change addr space diagnostics in casts to follow C++ style.
Wed, Feb 20, 5:53 AM · Restricted Project
Anastasia added inline comments to D58236: Make address space conversions a bit stricter..
Wed, Feb 20, 2:56 AM · Restricted Project
Anastasia added inline comments to D58388: [OpenCL] Simplify LLVM IR generated for OpenCL blocks.
Wed, Feb 20, 2:41 AM · Restricted Project

Tue, Feb 19

Anastasia added inline comments to D58346: [Sema] Change addr space diagnostics in casts to follow C++ style.
Tue, Feb 19, 8:19 AM · Restricted Project
Anastasia closed D58179: [OpenCL][PR40707] Allow OpenCL C types in C++ mode.

Committed in r354121.

Tue, Feb 19, 3:25 AM
Anastasia added inline comments to D58346: [Sema] Change addr space diagnostics in casts to follow C++ style.
Tue, Feb 19, 2:55 AM · Restricted Project

Mon, Feb 18

Anastasia added inline comments to D58346: [Sema] Change addr space diagnostics in casts to follow C++ style.
Mon, Feb 18, 11:05 AM · Restricted Project
Anastasia updated subscribers of D58236: Make address space conversions a bit stricter..
Mon, Feb 18, 9:47 AM · Restricted Project
Anastasia removed a reviewer for D57978: [CodeGen] Generate follow-up metadata for loops with more than one transformation.: Anastasia.
Mon, Feb 18, 7:51 AM · Restricted Project
Anastasia resigned from D57978: [CodeGen] Generate follow-up metadata for loops with more than one transformation..

This seems like an interesting change. So far in OpenCL we have actively used only unroll. I will let others to assess in more details.

Mon, Feb 18, 7:50 AM · Restricted Project
Anastasia accepted D58277: [OpenCL] Change type of block pointer for OpenCL.

LGTM! Thanks! This totally makes sense! I think we inherited that from ObjC but never adapted fully. This change has low risk of breaking backwards compatibility but might need some minor update in tools.

Mon, Feb 18, 7:36 AM · Restricted Project, Restricted Project
Anastasia added inline comments to D58236: Make address space conversions a bit stricter..
Mon, Feb 18, 7:29 AM · Restricted Project
Anastasia created D58346: [Sema] Change addr space diagnostics in casts to follow C++ style.
Mon, Feb 18, 5:13 AM · Restricted Project

Feb 15 2019

Anastasia committed rG2c4730ded83a: [OpenCL][PR40707] Allow OpenCL C types in C++ mode. (authored by Anastasia).
[OpenCL][PR40707] Allow OpenCL C types in C++ mode.
Feb 15 2019, 4:08 AM

Feb 14 2019

Anastasia added a comment to D57768: [SYCL] Add clang front-end option to enable SYCL device compilation flow..
  • SYCL seem to require adding tight dependencies from the standard libraries into the compiler because many language features are hidden behind library classes. This is not common for Clang. We had a discussion about this issue during the implementation of OpenCL C++ and it was decided not to go this route for upstream Clang. Can you explain your current approach to implement this? I think @rjmccall or @rsmith might need to be involved in this.

I'd like to know more about this, but I'll point out that this isn't unprecedented:

  • C compilers have hard-coded knowledge about va_list.
  • C++ compilers have hard-coded knowledge about std::type_info and std::initializer_list (and possibly others I've forgotten).

    Whether that's the right direction for SYCL, though, I can't say until I understand more about what dependencies are being proposed.
Feb 14 2019, 3:34 AM · Restricted Project

Feb 13 2019

Anastasia updated the diff for D58060: Fix diagnostic for addr spaces in reference binding.
  • Changed the diagnostic for binding reference and combined with existing similar one. That affected more tests however.
  • Changed comment explaining address space behavior in the reference initialization.
  • Reformatted.
Feb 13 2019, 11:03 AM
Anastasia added a comment to D58060: Fix diagnostic for addr spaces in reference binding.

So static_cast permits conversions from AS1 to AS2 where that conversion is implicitly allowed, and the new addrspace_cast would permit conversions from AS1 to AS2 where it is explicitly allowed. That seems like it fits in rather well with the idea in D57464 regarding support for specifying permitted AS conversions in target.

How about nested pointers, such as __X int * * -> __Y int * * or __X int * __Y * -> int * __Y *? static_cast has some ruleset for how to deal with qualifiers in nested pointers, I think, but I'm not sure how the rules for ASes should be here.

Feb 13 2019, 9:54 AM
Anastasia created D58179: [OpenCL][PR40707] Allow OpenCL C types in C++ mode.
Feb 13 2019, 7:22 AM

Feb 11 2019

Anastasia created D58060: Fix diagnostic for addr spaces in reference binding.
Feb 11 2019, 9:05 AM

Feb 7 2019

Anastasia committed rGe88e2b99353f: [OpenCL][PR40603] In C++ preserve compatibility with OpenCL C v2.0 (authored by Anastasia).
[OpenCL][PR40603] In C++ preserve compatibility with OpenCL C v2.0
Feb 7 2019, 9:33 AM
Anastasia updated the diff for D57824: [OpenCL][PR40603] In C++ preserve backwards compatibility with OpenCL C v2.0.
  • Moved version check inside the extension logic.
  • Changed commit message to reflect better functionality of the patch.
Feb 7 2019, 8:05 AM · Restricted Project
Anastasia added inline comments to D57824: [OpenCL][PR40603] In C++ preserve backwards compatibility with OpenCL C v2.0.
Feb 7 2019, 3:39 AM · Restricted Project

Feb 6 2019

Anastasia added a comment to D57464: Generalize method overloading on addr spaces to C++.

Btw, if we would implement something like this:
http://lists.llvm.org/pipermail/cfe-dev/2019-January/060798.html

Feb 6 2019, 9:33 AM