Page MenuHomePhabricator
Feed Advanced Search

Thu, Mar 21

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

I think I would lean towards the latter since it means less fudging around with a whole bunch of unrelated methods. Do @rjmccall or @rsmith have any further opinions on this?

Thu, Mar 21, 10:33 AM
Anastasia added a comment to D58236: Make address space conversions a bit stricter..

Any more input on this?

I could redo the patch to simply fix the bug and not make the conversions stricter, if that's preferable.

Thu, Mar 21, 10:30 AM · Restricted Project
Anastasia created D59646: [PR40778][PR41157][OpenCL] Prevent implicit initialization of local address space objects.
Thu, Mar 21, 8:20 AM
Anastasia retitled D59646: [PR40778][PR41157][OpenCL] Prevent implicit initialization of local address space objects from [PR40778][PR41157] Prevent implicit initialization of local address space objects to [PR40778][PR41157][OpenCL] Prevent implicit initialization of local address space objects.
Thu, Mar 21, 8:20 AM
Anastasia added a comment to D59603: [PR40707][PR41011][OpenCL] Allow addr space spelling without double underscore in C++ mode.

I was a little bit worried about

struct top_level { int i; };

private ::top_level a;

but it should be fine because in that case we have a tok::coloncolon

Thu, Mar 21, 4:43 AM
Anastasia updated the diff for D59603: [PR40707][PR41011][OpenCL] Allow addr space spelling without double underscore in C++ mode.

Updated test to use root namespace (commented by Ronan).

Thu, Mar 21, 4:39 AM

Wed, Mar 20

Herald added a project to D53705: [OpenCL] Postpone PSV address space diagnostic: Restricted Project.

Btw, I have created a patch that allows non-underscore prefixed spelling for address spaces in C++ for OpenCL:
https://reviews.llvm.org/D59603

Wed, Mar 20, 10:14 AM · Restricted Project
Anastasia created D59603: [PR40707][PR41011][OpenCL] Allow addr space spelling without double underscore in C++ mode.
Wed, Mar 20, 10:10 AM

Tue, Mar 19

Anastasia updated the diff for D59492: [OpenCL] Allow variadic macros as Clang feature.

Instead of removing the diagnostic completely change into a warning in pedantic mode.

Tue, Mar 19, 12:19 PM
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?

What would you suggest to put in a warning message? Clang normally doesn't warn about extensions...

Isn't that what -pedantic is for?

Tue, Mar 19, 12:18 PM
Anastasia committed rGcb16edeb4579: [OpenCL] Minor improvements in default header testing (authored by Anastasia).
[OpenCL] Minor improvements in default header testing
Tue, Mar 19, 10:10 AM
Anastasia added a comment to D59367: [Sema] Adjust address space of operands in remaining builtin operators.

This patch LGTM.

You might consider adding tests for weird cases like class types with conversion operators to reference types. To a certain extent that sort of thing is unimplementable because the space of address spaces is infinite, so we can't fall back on adding a candidate for every possible address space; but even if we don't plan on addressing it, we can test our current behavior to check that we don't do something unexpected (like crash or give a nonsensical diagnostic).

Tue, Mar 19, 9:52 AM · Restricted Project
Anastasia committed rG4ce581e5a9f9: [Sema] Adjust addr space of reference operand in compound assignment (authored by Anastasia).
[Sema] Adjust addr space of reference operand in compound assignment
Tue, Mar 19, 9:50 AM
Anastasia created D59544: [OpenCL] Minor improvements in default header testing.
Tue, Mar 19, 7:05 AM · Restricted Project
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

Mon, Mar 18

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 · Restricted Project
Anastasia created D59367: [Sema] Adjust address space of operands in remaining builtin operators.
Thu, Mar 14, 8:36 AM · Restricted Project

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

Feb 21 2019

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

Feb 20 2019

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

LGTM! Great! Thanks!

Feb 20 2019, 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.

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

Feb 19 2019

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

Committed in r354121.

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

Feb 18 2019

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

Feb 18 2019, 7:50 AM · Restricted Project