[cfe-dev] [RFC] Re-use OpenCL address space attributes for SYCL

Anastasia Stulova via cfe-dev cfe-dev at lists.llvm.org
Thu Aug 27 09:56:22 PDT 2020


Hi Alexey,

> John, Anastasia, does https://reviews.llvm.org/D62574 seem reasonable to you?
If so, I can rebase my patch of top of this one.

I have just reviewed the patch again and it generally looks fine.

However, I guess it will still not solve the address space deduction that you
discussed earlier? It also doesn't help to eliminate address spaces from AST by
converting them to generic that is what you need too? I still think that the main
concept of the address space attribute in Clang is the ability to propagate and
preserve different address spaces in types of AST, should they occur explicitly in
the source, and provide checks/diagnostics for mismatching address spaces.
But if this logic is undesirable for you I would encourage you to look at different
attributes, perhaps even at adding a new one. After all, you don't need to have
address spaces in AST types in order to propagate them to IR.

Cheers,
Anastasia

________________________________
From: Bader, Alexey <alexey.bader at intel.com>
Sent: 14 August 2020 22:31
To: Bevin Hansson <bevin.hansson at ericsson.com>; 'John McCall' <rjmccall at apple.com>; via cfe-dev <cfe-dev at lists.llvm.org>; Anastasia Stulova <Anastasia.Stulova at arm.com>
Cc: nd <nd at arm.com>; Victor Lomuller <victor at codeplay.com>
Subject: RE: [cfe-dev] [RFC] Re-use OpenCL address space attributes for SYCL

Hi Bevin,

Thank you for the head-up.
If we can commit this patch soon, we can easily limit conversion between default and OpenCL address spaces to SYCL mode to avoid any interference with OpenCL mode.
I think it's more preferable to do for the language mode to avoid overloading TargetInfo methods for all supported targets (currently SPIR and NVTPX).

John, Anastasia, does https://reviews.llvm.org/D62574 seem reasonable to you? If so, I can rebase my patch of top of this one.

Particularly this change makes it easier to define different behavior for different language modes:
"Moves QualType/Qualifiers accessors which deal with qualifier relations (such as compatiblyIncludes, etc.) to ASTContext, as Qualifiers cannot be made aware of the relations between address spaces on their own."

Thanks,
Alexey

-----Original Message-----
From: Bevin Hansson <bevin.hansson at ericsson.com>
Sent: Thursday, August 6, 2020 3:22 PM
To: 'John McCall' <rjmccall at apple.com>; Bader, Alexey <alexey.bader at intel.com>; via cfe-dev <cfe-dev at lists.llvm.org>
Cc: nd <nd at arm.com>
Subject: RE: [cfe-dev] [RFC] Re-use OpenCL address space attributes for SYCL

Hi,

>Treating the default address space as a superspace of some (all?) of the other address spaces is sensible and should definitely work.
>There are already predicates in the AST for deciding whether two address spaces are related this way; they probably need to be target-customizable, but that should be straightforward.

Just to chime in here; I have a patch for making address space relations target-configurable here: https://reviews.llvm.org/D62574

/ Bevin

_______________________________________________
cfe-dev mailing list
cfe-dev at lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20200827/b494fc50/attachment.html>


More information about the cfe-dev mailing list